[PATCH] elf: Set rel_from_abs to 1 for __ehdr_start
H.J. Lu
hjl.tools@gmail.com
Fri Nov 13 13:34:23 GMT 2020
On Thu, Nov 12, 2020 at 9:06 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Thu, Nov 12, 2020 at 04:56:41AM -0800, H.J. Lu via Binutils wrote:
> > --- a/ld/ldelf.c
> > +++ b/ld/ldelf.c
> > @@ -1590,6 +1590,7 @@ ldelf_before_allocation (char *audit, char *depaudit,
> > (char *) &ehdr_start->u + sizeof ehdr_start->u.def.next,
> > sizeof ehdr_start_save_u);
> > ehdr_start->type = bfd_link_hash_defined;
> > + ehdr_start->ldscript_def = 1;
> > ehdr_start->u.def.section = bfd_abs_section_ptr;
> > ehdr_start->u.def.value = 0;
> > }
>
> I suspect this may interact badly with DEFINED (__ehdr_start) in a
> script. Can you check that please?
>
Here is the updated patch to set rel_from_abs to 1 instead. OK
for master?
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-elf-Set-rel_from_abs-to-1-for-__ehdr_start.patch
Type: text/x-patch
Size: 3526 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20201113/c979bfb4/attachment.bin>
More information about the Binutils
mailing list