[PATCH] elf: Set ldscript_def to 1 for __ehdr_start

Alan Modra amodra@gmail.com
Fri Nov 13 05:06:40 GMT 2020


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?

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list