[AArch64] Improve BFD overflow warning message for -fpic
Jiong Wang
jiong.wang@arm.com
Tue Jul 28 15:58:00 GMT 2015
This patch gives the user more readable error message.
for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14 overflow,
largely it's caused by too many GOT entry can't fit into -fpic model,
need to recompile using -fPIC to allow 4G GOT table size.
the new error message will be the following:
./ld-new -shared -o tmpdir/dump tmpdir/dump0.o
tmpdir/dump0.o:(.text+0x0): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against undefined symbol `global_0'
tmpdir/dump0.o:(.text+0x0): warning: Too many GOT entries for -fpic, please recompile with -fPIC
./ld-new: final link failed: Nonrepresentable section on output
2015-07-28 Jiong Wang <jiong.wang@arm.com>
bfd/
* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add more warning message for
R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
--
Regards,
Jiong
-------------- next part --------------
A non-text attachment was scrubbed...
Name: improve-error.patch
Type: text/x-diff
Size: 1015 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150728/f7a1f7bb/attachment.bin>
More information about the Binutils
mailing list