From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Bambrough To: bfd@cygnus.com Subject: Re: arm questions Date: Thu, 15 Apr 1999 11:31:00 -0000 Message-id: <371634AC.F67511BF@corelcomputer.com> References: <199904151738.KAA02138@canuck.cygnus.com.> <19990415180136.2600.qmail@daffy.airs.com> X-SW-Source: 1999/msg00086.html Ian Lance Taylor wrote: > > Date: Thu, 15 Apr 1999 10:38:25 -0700 > From: Doug Evans > > Two random questions. > > 1) > elfarm-oabi.c uses USE_RELA > elfarm-nabi.c uses USE_REL > That seems rather backwards, doesn't it? > I'd expect a new version of an abi to switch from USE_REL to USE_RELA, > but not the other way around. > [not that it can be changed, but rather ... why the switch?] > > This is my understanding of the situation. If anybody knows that I am > wrong, please correct me. > > The ARM ELF situation is a mess because there were two separate > implementations. > > Some folks in England put together ARM GNU/Linux, but they took a very > long time to get the copyright stuff done. For some reason that I do > not know, that implementation used REL rather than RELA relocs. Actually Phil is in England, Pat Beirne and I are in Canada. And that very long copyright time was due entirely to Corel's legal department. They were a pain in the ass. We chose REL because we did not need the addend. In hindsight I would choose RELA. We did this work over a period of about 6 months when we brought up gcc, binutils, gdb and glibc on the NetWinder. > In the meantime, Cygnus implemented ARM ELF, using RELA relocs. Something of which we were entirely unaware of at the time, otherwise we would have attempted to collaborate in a closer fashion. > It's obviously desirable to have a single ARM ELF ABI, and the best > choice is probably the one currently being used for GNU/Linux. > Therefore, when we straightened out the copyright situation, we dumped > the Cygnus RELA implementation in favour of the GNU/Linux REL > implementation. I don't know about better. Cygnus does pretty good work. It probably has a larger installed base ATM, as the GNU/Linux implementation is used by HJ Lu's 2.9.1.0.xx releases of binutils. I think most of the ARM community uses this rather than the GAS2 snapshots. > Whats the R_ARM_THM_XPC22 reloc for? The docs say it is a Thumb BLX pair. It is a two byte Thumb instruction. It is a relocateable branch instruction, where bits 0-10 encode the 11 most significant bits of the branch offset, and bits 0-10 of the next instruction word encode the least significant bits of the branch offset. There is also a note about it being provisional. The least significant bit of the branch offset must be zero. Scott Bambrough