Re: Inconsistent warning/error message by GCC while linking 32/64 bit binary/library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 14, 2015 at 4:24 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
> On 14 December 2015 at 10:15, vijay nag wrote:
>> Hello GCC,
>>
>> I was working on a 32-64 bit porting project and while debugging a
>> crash I was very surprised to learn that GCC allowed linking of 64 bit
>> library against 32 bit binary with a warning.
>>
>> If the classic "-L" compiler switch is used, GCC barfs out a "Skipping
>> incompatible xxxx.a" error and doesn't emit any executable. However,
>> It is interesting to note that if full path of the library is given
>> instead as part of compiler flag instead of "-L... -l" incantation,
>> GCC emitted the final executable with a warning.  So the question is,
>> does ELF specification allow interlinking of 32/64 bit obj files ? Why
>> are the compiler messages different in these two cases ? Why did the
>> compiler emit the executable in the first place instead of bailing out
>> ?
>
> Those aren't compiler messages, they're linker messages, and the
> linker is not part of GCC.

Thanks for the quick reply. Shall forward it to binutils dev mailing group.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux