mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
5242a0a000
__patchable_function_entries section is generated by a compiler with -fpatchable-function-entry=XX. The assembly code looks like this: --- .text .globl _start .type _start, %function _start: .section __patchable_function_entries,"aw",%progbits .dc.a .LPFE1 .text .LPFE1: .byte 0 --- But --gc-sections will silently remove __patchable_function_entries section and generate corrupt result. This patch disallows garbage collection on __patchable_function_entries section without linked-to section. bfd/ PR ld/25490 * elflink.c (_bfd_elf_gc_mark_extra_sections): Issue an error for garbage collection on __patchable_function_entries section without linked-to section. ld/ PR ld/25490 * testsuite/ld-elf/pr25490-1.d: New file. * testsuite/ld-elf/pr25490-1.s: Likewise.
10 lines
147 B
ArmAsm
10 lines
147 B
ArmAsm
.text
|
|
.globl _start
|
|
.type _start, %function
|
|
_start:
|
|
.section __patchable_function_entries,"aw",%progbits
|
|
.dc.a .LPFE1
|
|
.text
|
|
.LPFE1:
|
|
.byte 0
|