readelf .debug_aranges header display
Alan Modra
amodra@gmail.com
Mon Feb 23 03:01:19 GMT 2026
Print "Address size" rather than "Pointer Size" and "Segment size"
rather than "Segment Size", using the same names and capitalisation
as is used when printing other headers with these fields.
binutils/
* dwarf.c
* testsuite/binutils-all/i386/compressed-1a.d
* testsuite/binutils-all/x86-64/compressed-1a.d
gas/
* testsuite/gas/aarch64/dwarf.d: Update expected output.
* testsuite/gas/i386/dw2-compress-3a.d: Likewise.
* testsuite/gas/i386/dw2-compress-3b.d: Likewise.
* testsuite/gas/i386/dw2-compressed-3a.d: Likewise.
* testsuite/gas/i386/dw2-compressed-3b.d: Likewise.
* testsuite/gas/elf/dwarf-5-irp.d: Likewise.
* testsuite/gas/elf/dwarf2-20.d: Likewise, and match mn10200
output, removing xfail.
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 46499ac2436..fa8dce25d44 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -9075,8 +9075,8 @@ display_debug_aranges (struct dwarf_section *section,
printf (_(" Version: %d\n"), arange.ar_version);
printf (_(" Offset into .debug_info: %#" PRIx64 "\n"),
arange.ar_info_offset);
- printf (_(" Pointer Size: %d\n"), arange.ar_address_size);
- printf (_(" Segment Size: %d\n"), arange.ar_segment_size);
+ printf (_(" Address size: %d\n"), arange.ar_address_size);
+ printf (_(" Segment size: %d\n"), arange.ar_segment_size);
if (!address_size_ok (section->name, arange.ar_address_size,
arange.ar_segment_size))
diff --git a/binutils/testsuite/binutils-all/i386/compressed-1a.d b/binutils/testsuite/binutils-all/i386/compressed-1a.d
index d8aabd66829..47b97771ef9 100644
--- a/binutils/testsuite/binutils-all/i386/compressed-1a.d
+++ b/binutils/testsuite/binutils-all/i386/compressed-1a.d
@@ -121,8 +121,8 @@ Contents of the .[z]?debug_aranges section:
Length: 28
Version: 2
Offset into .[z]?debug_info: (0x)?0
- Pointer Size: 4
- Segment Size: 0
+ Address size: 4
+ Segment size: 0
Address Length
00000000 0000001b ?
diff --git a/binutils/testsuite/binutils-all/x86-64/compressed-1a.d b/binutils/testsuite/binutils-all/x86-64/compressed-1a.d
index e125829bf0f..a1466ded5ff 100644
--- a/binutils/testsuite/binutils-all/x86-64/compressed-1a.d
+++ b/binutils/testsuite/binutils-all/x86-64/compressed-1a.d
@@ -120,8 +120,8 @@ Contents of the .[z]?debug_aranges section:
Length: 44
Version: 2
Offset into .[z]?debug_info: (0x)?0
- Pointer Size: 8
- Segment Size: 0
+ Address size: 8
+ Segment size: 0
Address Length
0000000000000000 0000000000000015 ?
diff --git a/gas/testsuite/gas/aarch64/dwarf.d b/gas/testsuite/gas/aarch64/dwarf.d
index 226a71968fd..ee1b7bf293d 100644
--- a/gas/testsuite/gas/aarch64/dwarf.d
+++ b/gas/testsuite/gas/aarch64/dwarf.d
@@ -21,8 +21,8 @@ Contents of the .debug_aranges section:
Length: (44|28)
Version: 2
Offset into .debug_info: (0x)?0
- Pointer Size: (8|4)
- Segment Size: 0
+ Address size: (8|4)
+ Segment size: 0
Address[ ]+Length
0+ 0+8 ?
diff --git a/gas/testsuite/gas/elf/dwarf-5-irp.d b/gas/testsuite/gas/elf/dwarf-5-irp.d
index 6bcdc6636a6..a4f01355db3 100644
--- a/gas/testsuite/gas/elf/dwarf-5-irp.d
+++ b/gas/testsuite/gas/elf/dwarf-5-irp.d
@@ -89,8 +89,8 @@ Contents of the \.debug_aranges section:
Length: .*
Version: +2
Offset into \.debug_info: .*
- Pointer Size: +[248]
- Segment Size: +0
+ Address size: +[248]
+ Segment size: +0
Address +Length
0+ [0-9a-f]+ ?
diff --git a/gas/testsuite/gas/elf/dwarf2-20.d b/gas/testsuite/gas/elf/dwarf2-20.d
index 04673014457..99078f9233a 100644
--- a/gas/testsuite/gas/elf/dwarf2-20.d
+++ b/gas/testsuite/gas/elf/dwarf2-20.d
@@ -1,18 +1,16 @@
#as: -gdwarf-3
#readelf: -wr
#name: DWARF2_20: debug ranges ignore non-code sections
-# The mn10200 target has a pointer size of 3, but it does not use segment selectors. This confuses DWARF and readelf will complain.
-#xfail: mn102*-*
# score-elf, tic6x-elf and xtensa-elf need special handling to support .nop 16
#xfail: score-* tic6x-* xtensa-*
Contents of the .debug_aranges section:
-[ ]+Length:[ ]+(16|28|44)
+[ ]+Length:[ ]+(16|20|28|44)
[ ]+Version:.*
[ ]+Offset into .debug_info:[ ]+(0x)?0
-[ ]+Pointer Size:[ ]+(2|4|8)
-[ ]+Segment Size:[ ]+0
+[ ]+Address size:[ ]+(2|3|4|8)
+[ ]+Segment size:[ ]+0
[ ]+Address[ ]+Length
[ ]+0+000 0+010 ?
diff --git a/gas/testsuite/gas/i386/dw2-compress-3a.d b/gas/testsuite/gas/i386/dw2-compress-3a.d
index 0b990184da3..fd0271084a7 100644
--- a/gas/testsuite/gas/i386/dw2-compress-3a.d
+++ b/gas/testsuite/gas/i386/dw2-compress-3a.d
@@ -58,8 +58,8 @@ Contents of the .debug_aranges section:
Length: 20
Version: 2
Offset into .debug_info: (0x)?0
- Pointer Size: 4
- Segment Size: 0
+ Address size: 4
+ Segment size: 0
Address Length
00000000 00000000 ?
diff --git a/gas/testsuite/gas/i386/dw2-compress-3b.d b/gas/testsuite/gas/i386/dw2-compress-3b.d
index 0b21122fc55..9e90bb2c023 100644
--- a/gas/testsuite/gas/i386/dw2-compress-3b.d
+++ b/gas/testsuite/gas/i386/dw2-compress-3b.d
@@ -58,8 +58,8 @@ Contents of the .debug_aranges section:
Length: 20
Version: 2
Offset into .debug_info: (0x)?0
- Pointer Size: 4
- Segment Size: 0
+ Address size: 4
+ Segment size: 0
Address Length
00000000 00000000 ?
diff --git a/gas/testsuite/gas/i386/dw2-compressed-3a.d b/gas/testsuite/gas/i386/dw2-compressed-3a.d
index 5a148454685..bd0f2acb6d0 100644
--- a/gas/testsuite/gas/i386/dw2-compressed-3a.d
+++ b/gas/testsuite/gas/i386/dw2-compressed-3a.d
@@ -58,8 +58,8 @@ Contents of the .debug_aranges section:
Length: 20
Version: 2
Offset into .debug_info: (0x)?0
- Pointer Size: 4
- Segment Size: 0
+ Address size: 4
+ Segment size: 0
Address Length
00000000 00000000 ?
diff --git a/gas/testsuite/gas/i386/dw2-compressed-3b.d b/gas/testsuite/gas/i386/dw2-compressed-3b.d
index 6c2cd12a7b7..c159868062a 100644
--- a/gas/testsuite/gas/i386/dw2-compressed-3b.d
+++ b/gas/testsuite/gas/i386/dw2-compressed-3b.d
@@ -58,8 +58,8 @@ Contents of the .debug_aranges section:
Length: 20
Version: 2
Offset into .debug_info: (0x)?0
- Pointer Size: 4
- Segment Size: 0
+ Address size: 4
+ Segment size: 0
Address Length
00000000 00000000 ?
--
Alan Modra
More information about the Binutils
mailing list