This is the mail archive of the 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: RFC: [PATCH] Properly handle relocs against absolute symbols

On Sun, Mar 13, 2016 at 05:25:55PM -0700, H.J. Lu wrote:
> +  /* Symbol is defiend by linker.  */
> +  unsigned int def_linker : 1;
> +  /* Symbol is defiend by linker and absolue.  */
> +  unsigned int def_linker_abs : 1;

Hmm, you need to add these because you want to make decisions at
size_dynamic_sections time based on a symbol's section, and symbols
defined in a linker script don't have their final section set until
later.  I don't see a practical way of setting a linker defined
symbol's section and value before section vmas are finalized, so
setting them early enough doesn't seem an option.

How about implementing a linker callback instead of adding yet more
flags to struct elf_link_hash_entry?  I'm thinking that you could add
a rel_from_abs flag to struct definedness_hash_entry, set in
update_definedness, then have the callback interrogate the

Alan Modra
Australia Development Lab, IBM

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