mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
ac423761af
This fix keeps the section with the highest alignment when folding sections with ICF. PR gold/17704 * icf.cc (match_sections): Add new parameter section_addraligns. Check section alignment and keep the section with the strictest alignment. (find_identical_sections): New local variable section_addraligns. Store each section's alignment. * testsuite/pr17704a_test.s: New file. * testsuite/Makefile.am (pr17704a_test): New test. * testsuite/Makefile.in: Regenerate.
24 lines
320 B
ArmAsm
24 lines
320 B
ArmAsm
nop
|
|
.section .text.foo,"axG",@progbits,foo,comdat
|
|
foo:
|
|
ret
|
|
|
|
.section .text.bar,"axG",@progbits,bar,comdat
|
|
.align 2
|
|
bar:
|
|
ret
|
|
|
|
.section .text._start,"ax",@progbits
|
|
.globl _start
|
|
_start:
|
|
leaq bar(%rip), %rsi
|
|
testb $1, %sil
|
|
je .L9
|
|
mov $1, %eax
|
|
mov $1, %ebx
|
|
int $0x80
|
|
.L9:
|
|
mov $1, %eax
|
|
mov $0, %ebx
|
|
int $0x80
|