https://sourceware.org/bugzilla/show_bug.cgi?id=25665
Bug ID: 25665 Summary: aarch64 veneers not inserted with large .text object between caller and target Product: binutils Version: 2.33 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: rrorden at ptc dot com Target Milestone: --- Similar to https://sourceware.org/bugzilla/show_bug.cgi?id=18668, a "relocation truncated to fit: R_AARCH64_CALL26" error occurs with this test case: Using gcc 9.2.0, ld 2.33.1 for aarch64-unknown-linux-gnu $ cat main.c void foo (); int main () {foo();} $ cat large-text.s .text .zero 134217728 $ cat foo.c void foo(void){} $ gcc -c -o main.o main.c $ as -o large-text.o large-text.s $ gcc -c -o foo.o foo.c $ gcc -o main main.o large-text.o foo.o main.o: in function `main': main.c:(.text+0x8): relocation truncated to fit: R_AARCH64_CALL26 against symbol `foo' defined in .text section in foo.o collect2: error: ld returned 1 exit status It links (no veneers needed) if you move large-text.o to the front or end of the list, of course. The same files compile and link fine (with veneers generated) on arm-linux-gnueabihf (32-bit) using gcc 8.3.0 and ld 2.31.1. I get "relocation truncated to fit" errors with gcc 5.1.1 and 6.4.1 aarch64-linux-gnu crosstools as well. I have a project that has to link many objects, including one with .text size > 128MB. -- You are receiving this mail because: You are on the CC list for the bug.