This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [2/16][binutils][AARCH64]Add relocation support for large memory model. [LD]Add BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 Support.
- From: Nick Clifton <nickc at redhat dot com>
- To: Renlin Li <renlin dot li at arm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Jiong Wang <jiong dot wang at arm dot com>
- Date: Tue, 8 Sep 2015 17:32:06 +0100
- Subject: Re: [2/16][binutils][AARCH64]Add relocation support for large memory model. [LD]Add BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 Support.
- Authentication-results: sourceware.org; auth=none
- References: <55EF0938 dot 9060404 at arm dot com>
Hi Renlin,
+ int howto_index = bfd_r_type - BFD_RELOC_AARCH64_RELOC_START;
+ (*_bfd_error_handler)
+ (_("%B: Local symbol descriptor table be NULL when applying "
+ "relocation %s against local symbol"),
+ input_bfd, elfNN_aarch64_howto_table[howto_index].name);
+ abort ();
I don't like having calls to abort() inside library functions. You have
already emitted an error message, so I think that it would be better to
set the error code and return FALSE.
+ /* For local symbol, we have done absolute relocation in static
+ linking stage. While for share library, we need to update
+ the content of GOT entry according to the share objects
+ loading base address. So we need to generate a
+ R_AARCH64_RELATIVE reloc for dynamic linker. */
+ s = globals->root.srelgot;
+ if (s == NULL)
+ abort ();
Likewise here.
Cheers
Nick