[PATCH] Add a record_link_assignments hook to ldemul
Alan Modra
amodra@gmail.com
Thu Apr 28 23:38:00 GMT 2016
On Thu, Apr 28, 2016 at 02:01:47PM -0700, H.J. Lu wrote:
> + /* Symbol is defined. Check if it is also defined in a regular
> + input file only when it is currently defined in a dynamic
> + object, since otherwise, it can't be a __start_<name> nor
> + __stop_<name> symbol. */
> + if (!h->def_dynamic)
> return NULL;
[snip]
> + if (s != NULL)
> + {
> + h->root.u.undef.section = s;
> + break;
> + }
You can't set u.undef here on a defined symbol. That's just too ugly,
even if you later set it to undefined. Better to force it
bfd_link_hash_undefined here.
This is getting quite messy, and I'm wondering if we even need
_bfd_elf_is_start_stop, except for gc-sections code.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list