aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-10-11 08:19:34 +0200
committerJan Beulich <jbeulich@suse.com>2024-10-11 08:19:34 +0200
commit1f1b5e506bf0d9bffef8525eb9bee19646713eb6 (patch)
tree0e7ff853c88a222cadaa41603f2f8594318aff63 /gas
parent873e7b6cf61b5e3fca8ab55ea1b8574dd00a3caf (diff)
downloadbinutils-1f1b5e506bf0d9bffef8525eb9bee19646713eb6.zip
binutils-1f1b5e506bf0d9bffef8525eb9bee19646713eb6.tar.gz
binutils-1f1b5e506bf0d9bffef8525eb9bee19646713eb6.tar.bz2
bfd/ELF: restrict file alignment for object files
While for executables properly aligning sections within the file can be quite relevant, the same is of pretty little importance for relocatable object files. Avoid passing "true" into _bfd_elf_assign_file_position_for_section() when dealing with object files, but compensate minimally by applying log_file_align in such cases as a cap to the alignment put in place.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/gas/aarch64/tail_padding.d6
-rw-r--r--gas/testsuite/gas/arm/ehabi-pacbti-m.d2
-rw-r--r--gas/testsuite/gas/ia64/group-1.d10
-rw-r--r--gas/testsuite/gas/ia64/group-2.d14
-rw-r--r--gas/testsuite/gas/mmix/bspec-2.d4
5 files changed, 18 insertions, 18 deletions
diff --git a/gas/testsuite/gas/aarch64/tail_padding.d b/gas/testsuite/gas/aarch64/tail_padding.d
index acb4ff2..12f2f6f 100644
--- a/gas/testsuite/gas/aarch64/tail_padding.d
+++ b/gas/testsuite/gas/aarch64/tail_padding.d
@@ -11,10 +11,10 @@ Section Headers:
Size EntSize Flags Link Info Align
\[ 0\] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
- \[ 1\] \.text PROGBITS 0000000000000000 00000040
+ \[ 1\] \.text PROGBITS 0000000000000000 000000..
0000000000000000 0000000000000000 AX 0 0 1
- \[ 2\] \.data PROGBITS 0000000000000000 00000040
+ \[ 2\] \.data PROGBITS 0000000000000000 000000..
0000000000000008 0000000000000000 WA 0 0 64
- \[ 3\] \.bss NOBITS 0000000000000000 00000080
+ \[ 3\] \.bss NOBITS 0000000000000000 000000..
000000000000000c 0000000000000000 WA 0 0 64
#...
diff --git a/gas/testsuite/gas/arm/ehabi-pacbti-m.d b/gas/testsuite/gas/arm/ehabi-pacbti-m.d
index 1b13020..dca7abd 100644
--- a/gas/testsuite/gas/arm/ehabi-pacbti-m.d
+++ b/gas/testsuite/gas/arm/ehabi-pacbti-m.d
@@ -4,7 +4,7 @@
#readelf: -u
#target: [is_elf_format]
-Unwind section '.ARM.exidx' at offset 0x5c contains 1 entry:
+Unwind section '.ARM.exidx' at offset 0x[0-9a-f]+ contains 1 entry:
0x0: @0x0
Compact model index: 1
diff --git a/gas/testsuite/gas/ia64/group-1.d b/gas/testsuite/gas/ia64/group-1.d
index a04a5cc..5c712ab 100644
--- a/gas/testsuite/gas/ia64/group-1.d
+++ b/gas/testsuite/gas/ia64/group-1.d
@@ -8,15 +8,15 @@ Section Headers:
Size EntSize Flags Link Info Align
\[ 0\] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
- \[ 1\] \.group GROUP 0000000000000000 00000040
+ \[ 1\] \.group GROUP 0000000000000000 [0-9a-f]+
0000000000000008 0000000000000004 6 6 4
- \[ 2\] \.text PROGBITS 0000000000000000 00000050
+ \[ 2\] \.text PROGBITS 0000000000000000 [0-9a-f]+
0000000000000000 0000000000000000 AX 0 0 16
- \[ 3\] \.data PROGBITS 0000000000000000 00000050
+ \[ 3\] \.data PROGBITS 0000000000000000 [0-9a-f]+
0000000000000000 0000000000000000 WA 0 0 1
- \[ 4\] \.bss NOBITS 0000000000000000 00000050
+ \[ 4\] \.bss NOBITS 0000000000000000 [0-9a-f]+
0000000000000000 0000000000000000 WA 0 0 1
- \[ 5\] \.text PROGBITS 0000000000000000 00000050
+ \[ 5\] \.text PROGBITS 0000000000000000 [0-9a-f]+
0000000000000010 0000000000000000 AXG 0 0 16
\[ 6\] \.symtab SYMTAB 0000000000000000 .*
00000000000000c0 0000000000000018 7 8 8
diff --git a/gas/testsuite/gas/ia64/group-2.d b/gas/testsuite/gas/ia64/group-2.d
index 52a313a..91473df 100644
--- a/gas/testsuite/gas/ia64/group-2.d
+++ b/gas/testsuite/gas/ia64/group-2.d
@@ -9,19 +9,19 @@ Section Headers:
Size EntSize Flags Link Info Align
\[ 0\] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
- \[ 1\] \.group GROUP 0000000000000000 00000040
+ \[ 1\] \.group GROUP 0000000000000000 [0-9a-f]+
0000000000000014 0000000000000004 9 5 4
- \[ 2\] \.text PROGBITS 0000000000000000 00000060
+ \[ 2\] \.text PROGBITS 0000000000000000 [0-9a-f]+
0000000000000000 0000000000000000 AX 0 0 16
- \[ 3\] \.data PROGBITS 0000000000000000 00000060
+ \[ 3\] \.data PROGBITS 0000000000000000 [0-9a-f]+
0000000000000000 0000000000000000 WA 0 0 1
- \[ 4\] \.bss NOBITS 0000000000000000 00000060
+ \[ 4\] \.bss NOBITS 0000000000000000 [0-9a-f]+
0000000000000000 0000000000000000 WA 0 0 1
- \[ 5\] \.gnu\.linkonce\.t\.f PROGBITS 0000000000000000 00000060
+ \[ 5\] \.gnu\.linkonce\.t\.f PROGBITS 0000000000000000 [0-9a-f]+
0000000000000000 0000000000000000 AXG 0 0 16
- \[ 6\] \.gnu\.linkonce\.ia6 PROGBITS 0000000000000000 00000060
+ \[ 6\] \.gnu\.linkonce\.ia6 PROGBITS 0000000000000000 [0-9a-f]+
0000000000000010 0000000000000000 AG 0 0 8
- \[ 7\] \.gnu\.linkonce\.ia6 IA_64_UNWIND 0000000000000000 00000070
+ \[ 7\] \.gnu\.linkonce\.ia6 IA_64_UNWIND 0000000000000000 [0-9a-f]+
0000000000000018 0000000000000000 ALG 5 5 8
\[ 8\] \.rela\.gnu\.linkonc RELA 0000000000000000 .*
0000000000000048 0000000000000018 IG 9 7 8
diff --git a/gas/testsuite/gas/mmix/bspec-2.d b/gas/testsuite/gas/mmix/bspec-2.d
index 2ade9b6..02ec049 100644
--- a/gas/testsuite/gas/mmix/bspec-2.d
+++ b/gas/testsuite/gas/mmix/bspec-2.d
@@ -1,11 +1,11 @@
#readelf: -Sr -T -x1 -x4
There are 11 section headers, starting at offset .*:
#...
- \[ 4\] \.MMIX\.spec_data\.2 PROGBITS 0+ 0+48
+ \[ 4\] \.MMIX\.spec_data\.2 PROGBITS 0+ [0-9a-f]+
0+10 0+ 0 0 8
\[ 5\] \.rela\.MMIX\.spec_d RELA 0+ .*
+0+30 0+18 +I +8 +4 +8
- \[ 6\] \.MMIX\.spec_data\.3 PROGBITS 0+ 0+58
+ \[ 6\] \.MMIX\.spec_data\.3 PROGBITS 0+ [0-9a-f]+
0+8 0+ 0 0 8
\[ 7\] \.rela\.MMIX\.spec_d RELA 0+ .*
+0+18 +0+18 +I +8 +6 +8