| Summary: | MEMORY regions can no longer use LENGTH and ORIGIN (2.32 regression). | ||
|---|---|---|---|
| Product: | binutils | Reporter: | Nick Bowler <nbowler> |
| Component: | ld | Assignee: | Not yet assigned to anyone <unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | nickc |
| Priority: | P2 | ||
| Version: | 2.32 | ||
| Target Milestone: | --- | ||
| Host: | Target: | ||
| Build: | Last reconfirmed: | ||
| Project(s) to access: | ssh public key: | ||
| Attachments: | Possible fix | ||
|
Description
Nick Bowler
2019-03-01 22:13:11 UTC
(In reply to Nick Bowler from comment #0) > This works as exepcted with ld-2.31: the codestart symbol gets the value 0 > and the datastart symbol gets the value 16777216. However, 2.32 appears to > reject the LENGTH(code) use in the MEMORY block: Proofread fail... I revised the test.ld script but not this paragraph. "codestart" should be "a_start", "datastart" should be "b_start", and "LENGTH(code)" should be "ORIGIN(a) + LENGTH(a)" The master branch has been updated by Nick Clifton <nickc@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=912ebfa0d748b4a762dbc4311364c38692c7f626 commit 912ebfa0d748b4a762dbc4311364c38692c7f626 Author: Nick Bowler <nbowler@draconx.ca> Date: Wed Mar 6 15:20:29 2019 +0000 Allow the use of the ORIGIN and LENGTH attributes in expressions inside MEMORY regions. PR 24289 * ldexp.c (fold_name): Allow lookups of the LENGTH and ORIGIN attributes during the first phase. Hi Nick, Thanks for the bug report and patch. I have checked the patch in, so I hope that this resolves the problem. Cheers Nick |