This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
I've noticed that gold might print an invalid value (-1ULL) as
the address for a relaxed section. For example:
$ cat > test.s << EOF
.globl _start, foo
.section ".text.start", "ax"
_start:
bl foo
.section ".text.hole", "ax"
.space 0x4000000
.section ".text.foo", "ax"
foo:
b _start
EOF
$ arm-none-eabi-as test.s -o test.o
$ ./gold-master test.o -o test.out -Map test.map
$ sed -n '/^.text/,/^$/p' test.map
.text 0x00008074 0x4000018
.text 0x00008074 0x0 test.o
.text.start 0xffffffffffffffff 0x4 test.o
0x00008074 _start
.text.hole 0x00008080 0x4000000 test.o
.text.foo 0xffffffffffffffff 0x4 test.o
0x04008080 foo
Here is the patch for the issue.
Best regards,
Igor Kudrin
---
gold/ChangeLog
* mapfile.cc
(Mapfile::print_input_section): Implement the spacial case
for a relaxed section to find its address.
* testsuite/Makefile.am (arm_relaxed_in_map): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/arm_relaxed_in_map.s: New test source file.
* testsuite/arm_relaxed_in_map.sh: New test script.
Attachment:
gold-invalid-address-of-relaxed-section-in-mapfile.patch.txt
Description: gold-invalid-address-of-relaxed-section-in-mapfile.patch.txt
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |