This is the mail archive of the binutils@sourceware.org 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: ld -shared support


Hi William,

> Can anyone describe the meaning of enabling the following macros ?
> 
> #define elf_backend_rela_normal
> #define elf_backend_can_refcount
> #define elf_backend_plt_readonly
> #define elf_backend_want_got_sym
> #define elf_backend_want_plt_sym
> #define elf_backend_want_dynrelro
> #define elf_backend_got_header_size
> #define elf_backend_want_got_plt
> 

Sadly internal documentation for the binutils is sadly lacking.
The best method is to look for how these macros are used in the
code itself.

So for example elf_backend_rela_normal is used in bfd/elflink.c
to determine is the addend in RELA type relocs should be adjusted 
when performing a relocatable link.  Most backends set the default
for this field to 1, but there are some that do not.  In order to
decide what to do, you need to consult the ABI for your architecture.
If you are actually creating the ABI, then you get to choose, and
probably going with the majority of other ports - and setting the
value to 1 - will be a good idea.

You can perform similar investigations for the other macros.
If you are having trouble understanding their operation howrver
please do feel free to post to this list again.

Cheers
  Nick



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