Re: Assembly symbol generation

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

 



Daniel Lohmann writes:
 > Andrew Haley wrote:
 > > Katana Steel writes:
 > >  > 
 > >  > under x86 & x64 linux this creates the symbols (output from nm):
 > >  >         U  function1
 > >  >         U  function2
 > >  > and using cygwin & mingw (x86) it creates these symbols (output from nm):
 > >  >         U  _function1
 > >  >         U  _function2
 > >  > 
 > >  > is there a good reason for this? 
 > > 
 > > The ABI says so.  The ABI allows programs generated by different tools
 > > to be linked together: it doesn't really matter what the convention
 > > is, as long as everyone on a particular platform agrees.
 > > 
 > > The "_" prefix is in fact an old UNIX convention that was IIRC dropped
 > > by UNIX System V when it went over to ELF format binaries.
 > 
 > On most platforms there is also a -mno-underscores or 
 > -fno-leading-underscores or similar option available that can be used to 
 > suppress this anachronism.

This doesn't help at all: you won't be able to link with any libraries
if you don't use the local convention.

Andrew.

[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