This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: can't make with gcc on solaris 11.3


On Thu, Oct 19, 2017 at 8:54 AM, Mason <slash.tmp@free.fr> wrote:
> On 19/10/2017 11:47, sugar wrote:
>
>> /usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/collect2 [...]
>> ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2458
>> ld: fatal: bad section layout: .SUNW_ldynsym must precede and be adjacent to .dynsym
>> collect2: ld returned 1 exit status
>
> It seems that the (Solaris) linker doesn't like what the
> (GNU) assembler produced.
>
> What is the output of
> /usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/collect2 -v

$ /usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/collect2 -v
collect2 version 4.8.2
/usr/bin/ld -v
ld: fatal: unrecognized option '-v'
ld: fatal: use the '-z help' option for usage information
collect2: error: ld returned 1 exit status

$ /usr/gcc/4.8/lib/gcc/i386-pc-solaris2.11/4.8.2/collect2 --version
collect2 version 4.8.2
/usr/bin/ld --version
ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2458

However,

$ /usr/gnu/bin/ld -v
GNU ld (GNU Binutils) 2.23.1

> On my Linux system, collect2 -v prints:
> collect2 version 7.2.0
> /usr/bin/ld -v
> GNU ld (GNU Binutils for Ubuntu) 2.24
>
> So basically, collect2 just invokes /usr/bin/ld
> (which is gnu ld on a Linux system)
> https://gcc.gnu.org/onlinedocs/gccint/Collect2.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]