This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: gas on Mac OS X



On 21.04.2004, at 17:28, Ian Lance Taylor wrote:


Martin Schaffner <schaffner@gmx.li> writes:

Thanks for working on this.  I wish we could call the files macho
instead of mach-o, but I guess that has a pronunciation problem.

* Indirect symbols. Mach-O supports so called "indirect symbols",
which  are something different than the indirect symbols of ELF. Is
there a  terminology to distinguish these two concepts? Maybe in gcc?
We could  call the ones in Mach-o "mach-o-indirect symbols"...
Anyway, to support these there has to be an interface between bfd and
gas. This design has to be carefully thought out. Maybe someone can
help me.

Could you describe what Mach-O indirect symbols are?

Please read section "Indirect Addressing" of http://developer.apple.com/documentation/DeveloperTools/Conceptual/ MachORuntime/2rt_powerpc_abi/chapter_9_section_6.html


Myself, I have some problems understanding them. From the Apple doc I understand that it makes the last part of http://membres.lycos.fr/schaffner/prog/binutils/ indirect_symbols.tar.bz2 possible. But this also works on GNU/Linux...

I uploaded cctools to my homepage:
http://membres.lycos.fr/schaffner/prog/binutils/cctools-495.tar.bz2

Note that as far as I know ELF does not have indirect symbols.  BFD
supports indirect symbols because they are a GNU extension to the
a.out object file format, essentially another of way of solving the
problem which ELF weak defined symbols solve.  The ELF backend linker
then uses BFD indirect symbols as part of the implementation of ELF
versioned symbols.

* Weak references. These too are not the same thing as ELF's weak
symbols.

Are they the same as ELF weak undefined symbols, though?

I don't know ELF weak undefined symbols.


Mach-O weak references tell the dynamic linker: Link this symbol if you find it, otherwise set it to null and continue. The program must then check if the symbol is null before using it. This feature is useful for selectively implementing features that may be available on some systems, but not on others.

Martin


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