tech-toolchain archive

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

Re: .debug_info relocation



On Sun, Mar 06, 2016 at 08:50:13PM +0000, David Holland wrote:
> On Sun, Mar 06, 2016 at 04:31:57PM +0100, Martin Husemann wrote:
>  > > It looks like amd64 uses SHT_RELA for section .debug_info while i386 uses
>  > > SHT_REL.
>  > > 
>  > > Which archs use SHT_RELA and which use SHT_REL?
>  > > 
>  > > Is there a config file anywhere?
>  > 
>  > Not sure what you'd want to configure here.
>  > 
>  > IIRC the binutils backend for i386 only ever uses SHT_REL sections (it
>  > defines USE_REL to 1). On all other architectures the backend could
>  > create both types of relocs - not sure which ones actually do what.
>  > 
>  > Any tool dealing with it has to support both.
> 
> i386 is required for some kind of insane ELF compliance reason to use
> only SHT_REL, or at least this is what I've been told.

It's not compliance, it is just what the original ELF ABI said should be
used and changing it only across all tools to be consistent is a lot of
work as well as code duplicating in ld.elf_so. It is unclear how much an
advantage SHT_RELA actually provides.

Joerg


Home | Main Index | Thread Index | Old Index