mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
15b4f66b0a
Insert two stubs in a BTI enabled binary when fixing long calls: The first is near the call site and uses an indirect jump like before, but it targets the second stub that is near the call target site and uses a direct jump. This is needed when a single stub breaks BTI compatibility. The stub layout is kept fixed between sizing and building the stubs, so the location of the second stub is known at build time, this may introduce padding between stubs when those are relaxed. Stub layout with BTI disabled is unchanged.
16 lines
327 B
Plaintext
16 lines
327 B
Plaintext
OUTPUT_ARCH(aarch64)
|
|
ENTRY(_start)
|
|
SECTIONS
|
|
{
|
|
. = 0x10000;
|
|
.rela.plt : { *(.rela.plt) *(.rela.iplt) }
|
|
. = 0x18000;
|
|
.plt : { *(.plt) *(.iplt) }
|
|
. = 0x20000;
|
|
.text : { *(.text) }
|
|
. = 0x30000;
|
|
.got : { *(.got) *(.got.plt) }
|
|
. = 0x12340000;
|
|
.far : { *(.far) }
|
|
}
|