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: [PATCH][AArch64/bfd] Enable elf_backend_rela_normal for AArch64


On Fri, Jul 04, 2014 at 06:15:08PM +0100, Jiong Wang wrote:
> bfd/
>   * elfnn-aarch64.c (elf_backend_rela_normal): Set to 1.

This patch will break ld -r, since you will be adjusting relocs
against section symbols twice.  The following code in elfnn-aarch64.c
needs adjusting too.

      if (info->relocatable)
	{
	  /* This is a relocatable link.  We don't have to change
	     anything, unless the reloc is against a section symbol,
	     in which case we have to adjust according to where the
	     section symbol winds up in the output section.  */
	  if (sym != NULL && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
	    rel->r_addend += sec->output_offset;
	  continue;
	}

-- 
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]