https://sourceware.org/bugzilla/show_bug.cgi?id=32867
Bug ID: 32867
Summary: ldscript MAX expression including a symbol defined
outside section clauses gets the wrong value
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: hp at sourceware dot org
Target Milestone: ---
Created attachment 16018
--> https://sourceware.org/bugzilla/attachment.cgi?id=16018&action=edit
The two mentioned testcases in form of a git-format patch
For a script expression with an expression such as:
. = MAX(., END + MIN_BLOCK_SIZE - 1);
it matters whether END is defined inside or outside a section clause: using a
symbol defined outside a section clause gets the wrong value, even though END
ends up with the expected value in the symbol table.
See the attached testcases, which is a commit for two ld-script test-cases that
should be equivalent and where both should pass; maxdoto and maxdoti, but where
maxdoto fails. The maxdoti test passes for cris-elf, cris-linux-gnu, mmix, and
native x86_64-pc-linux-gnu.
This bug goes back at least as early as 2.31.1 (first tested version).
--
You are receiving this mail because:
You are on the CC list for the bug.