From: Georg-Johann Lay Date: Sun, 17 Dec 2023 18:20:54 +0000 (+0100) Subject: PR31177: Let region text start at __TEXT_REGION_ORIGIN___ X-Git-Tag: binutils-2_42~538 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d51cd0f64c6d3bd235f140ed71cc2c3e0b87a5ff;p=thirdparty%2Fbinutils-gdb.git PR31177: Let region text start at __TEXT_REGION_ORIGIN___ The start of MEMORY region text currently starts hard-coded at 0. The linker can produce more exact diagnostics when it knows the exact placements of the memory regions. For some old devices, program memory starts at 0x8000, so allow to specify program memory start at __TEXT_REGION_ORIGIN__ similar to how the data region is described. If ok, please apply to master. This one is also fine to back-port. Johann -- AVR: Use __TEXT_REGION_ORIGIN__ as start for MEMORY region text. ld/ PR 31177 * scripttempl/avr.sc (__TEXT_REGION_ORIGIN__): New symbol. (MEMORY): Use as start address for the text region. --- diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc index a44eba5c9e9..00ff49aacf4 100644 --- a/ld/scripttempl/avr.sc +++ b/ld/scripttempl/avr.sc @@ -92,6 +92,7 @@ OUTPUT_ARCH(${ARCH}) EOF test -n "${RELOCATING}" && cat <