bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/25665] aarch64 veneers not inserted with large .text object betw


From: rrorden at ptc dot com
Subject: [Bug ld/25665] aarch64 veneers not inserted with large .text object between caller and target
Date: Tue, 07 Apr 2020 15:20:32 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=25665

--- Comment #4 from rrorden at ptc dot com ---
We develop a Java Virtual Machine and tools, including an ahead-of-time
compiler to generate native code from Java bytecode. The output of that tool is
an ELF object with .rela.text, .text, .rodata, .data, and .bss sections. There
are many small functions (one for each Java method) and they make calls to each
other and to functions in other objects that are compiled from C/C++ and
statically linked with the tool output object. The aot-compiler is based on
LLVM and does not invoke a C compiler to generate the output object.

I suppose we could create the equivalent behavior of -ffunction-sections within
our aot compiler ELF output. I will investigate this possiblity. 

But your response begs the question: Why does this example work fine with the
32-bit arm-linux-gnueabihf linker? I see veneers generated and used in the
linked executable. Here is the disassembly of main():
00010408 <main>:
   10408:       e92d4800        push    {fp, lr}
   1040c:       e28db004        add     fp, sp, #4
   10410:       eb000002        bl      10420 <__foo_veneer>
   10414:       e3a03000        mov     r3, #0
   10418:       e1a00003        mov     r0, r3
   1041c:       e8bd8800        pop     {fp, pc}

00010420 <__foo_veneer>:
   10420:       e51ff004        ldr     pc, [pc, #-4]   ; 10424
<__foo_veneer+0x4>
   10424:       08010438        .word   0x08010438

Seems like someone figured out how to solve this problem already.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]