Re: Proposed targets to obsolete for gcc 3.5
Matthias Pfaller <[email protected]> Thu, 01 Jul 2004 09:06:32 +0200
| Newsgroups | gmane.os.netbsd.ports.pc532 |
|---|---|
| Message-ID | <[email protected]> |
Ian Dall wrote: > This glosses over one thing. Dynamic linking. The FSF binutils doesn't > have support dynamic linking on the ns32k. I've had a look a few times at > the changes made to support dynamic linking in the old binutils branch > used by NetBSD, but I've never fully understood them. > > I suspect not that much is needed, but as usual, the problem is > knowing what. I think we link to global symbols in shared objects by > fiddling entires in a global offset table, at run time. I think they > will all be straight two's complement numbers so the ns32k's ah > richness doesn't bite. What I don't understand is what the > pre-exisiting elf relocation types are, and which ones match the ns32k > types and what needs to be ns32k specific. That's more or less where I gave up (mostly due to lack of energy). In order to support dynamic linking one has to hack gas as well. Iirc it's only recognizing sb-relative references and augmenting their relocationinformation with RELOC_GLOB_DAT. The other thing one has to do is to set the relocationtype to jmpslot for undefined pc-relative relocations. Just have a look into gnu/usr.bin/gas/config/tc-ns32k.c (it's in the attic...) and search for PIC. Compared to 68k or i386 it's really simple :-). Anybody needing information on dynamic linking on the ns32k can get whatever I can find in the offline storage area of my brain... For the kernel and the library routines I tried to gate all symbolreferences through _C_LABEL in order to make it possible to remove the leading _ without too much trouble. Matthias -- Matthias Pfaller Software Entwicklung marco Systemanalyse und Entwicklung GmbH Tel +49 8131 5161 41 Hans-Böckler-Str. 2, D 85221 Dachau Fax +49 8131 5161 66 http://www.marco.de/ Email [email protected]