This is the mail archive of the 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]

[PATCH][gold] Fix printing the address of a relaxed section in the map file.


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"
    bl foo

.section ".text.hole", "ax"
    .space 0x4000000

.section "", "ax"
    b _start
$ arm-none-eabi-as test.s -o test.o
$ ./gold-master test.o -o test.out -Map
$ sed -n '/^.text/,/^$/p'
.text           0x00008074  0x4000018
 .text          0x00008074        0x0 test.o
 .text.start    0xffffffffffffffff        0x4 test.o
                0x00008074                _start
 .text.hole     0x00008080  0x4000000 test.o      0xffffffffffffffff        0x4 test.o
                0x04008080                foo

Here is the patch for the issue.

Best regards,
Igor Kudrin


	(Mapfile::print_input_section): Implement the spacial case
	for a relaxed section to find its address.
	* testsuite/ (arm_relaxed_in_map): New test.
	* testsuite/ Regenerate.
	* testsuite/arm_relaxed_in_map.s: New test source file.
	* testsuite/ 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]