"Question" Multiple definition of ' _start '

Source: Internet
Author: User

When using the GCC compiler, the program was able to compile, but the result was problematic, I looked up a lot of places, or I didn't know where the problem was. It was later discovered that a variable was not initialized.

I felt that when using VS, I rarely delay time on this issue, so I think of the-wall parameters that are rarely used, and I compile it with the correct compiler and use the correct program, but a bunch of warnings and errors come out of the-wall. As follows:

test2:in function ' _start ':
(. text+0x0): Multiple definition of ' _start '
/lib/.. /LIB64/CRT1.O: (. text+0x0): defined here
test2:in function ' _fini ':
(. fini+0x0): Multiple definition of ' _fini '
/lib/.. /LIB64/CRTI.O: (. fini+0x0): defined here
Test2: (. rodata+0x0): Multiple definition of ' _io_stdin_used '
/lib/.. /LIB64/CRT1.O: (. rodata.cst4+0x0): defined here
test2:in function ' Data_start ':
(. data+0x0): Multiple definition of ' __data_start '
/lib/.. /LIB64/CRT1.O: (. data+0x0): defined here
test2:in function ' Data_start ':
(. data+0x8): Multiple definition of ' __dso_handle '
/USR/LOCAL/LIB/GCC/X86_64-UNKNOWN-LINUX-GNU/4.9.1/CRTBEGIN.O: (. data+0x0): defined here
test2:in function ' main ':
(. Text+0xf8): Multiple definition of ' main '
/tmp/cc89ie33.o:test2.cpp: (. text+0x0): defined here
test2:in function ' _init ':
(. init+0x0): Multiple definition of ' _init '
/lib/.. /LIB64/CRTI.O: (. init+0x0): defined here
/USR/LOCAL/LIB/GCC/X86_64-UNKNOWN-LINUX-GNU/4.9.1/CRTEND.O: (. tm_clone_table+0x0): Multiple definition of ' __TMC_ End__ '
Test2: (. data+0x10): defined here
/usr/bin/ld:error in Test2 (. eh_frame); No. EH_FRAME_HDR table would be created.
Collect2:error:ld returned 1 exit status

How to solve this problem.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.