This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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: Elf OS ABI Number


> > Actually, we do have a few things that are different - QNX specific
> > relocations, different MIPS ABI, etc.  It seems like having the ABI
number
> > can do no harm but can certainly be useful.
>
> As I said before, new relocations is a valid reason for an OS_ABI field
> change.  However, an ABI change (calling standard) is not -- it doesn't
> change the meaning of the ELF container, which is what the field is about.
>  The harm is that a linker is supposed to reject an OS_ABI field setting
> it doesn't understand.

Yes, I just learned that yesterday.  I'm beginning to lean back towards the
.note section.  I'm beginning to win hearts and minds on this end as well.

> Is there a good reason why you've invented your own relocs?  If the
> processor vendor (who generally own the reloc space allocation for their
> processor) where to allocate a reloc that conflicts with your usage at a
> later date you might have a major problem on your hands.

We do some weird stuff for execute in place and various kernel stuff.  I
don't understand the details particularily well but we have to use our own
linker on certain startup code and such.  Probably doesn't affect much else.

> > The problem with things like
> > .note sections for identifying binaries is that a stripped binary can no
> > longer be identified.
>
> No, .note sections are not symbols, so are not removed by strip.  The only
> way to remove a .note section is to use objcopy and tell it not to copy
> that section.

Well, I should have been more clear on that.  When we put binaries into an
image, they are REALLY stripped - no sections at all.  They are also
pre-relocated so that they can be run directly off of flash or other memory
type media.  Ultimately, you can't really debug these anyway (bfd won't even
recognize them properly) so it doesn't really matter that much.  If you have
a version with debug info that gdb can load, you can debug them properly
anyway though so it's only a minor quibble.

cheers,

Kris



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