https://sourceware.org/bugzilla/show_bug.cgi?id=32968

--- Comment #1 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Georg-Johann Lay <g...@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c43883775227861c3cbfeda599fe1249fc39e683

commit c43883775227861c3cbfeda599fe1249fc39e683
Author: Georg-Johann Lay <a...@gjlay.de>
Date:   Thu May 15 10:29:25 2025 +0200

    AVR: ld/32968 - Assert that .progmem data resides in the lower 64 KiB.

    This patch locates the linker stubs / trampolines *after* all the .progmem
    sections.  This is the natural placement since progmem data has to reside
    in the lower 64 KiB (it is accessed using LPM), whereas the linker stubs
    are only required to be located in the lower 128 KiB of program memory.
    (They must be in the range of EICALL / EIJMP with EIND = 0.)

    The current location of the linker stubs was motivated by an invalid test
    case from PR13812 that allocates more than 64 KiB of progmem data.

    The patch adds an assertion that makes sure that no progmem data is
    allocated past 0xffff.

    Data that is accessed using ELPM should be located to .progmemx so that
    no .progmem addresses are wasted.  .progmemx was introduced in 2017 and
    is used by __memx, __flashx and by the current AVR-LibC.
    (The compiler uses .jumptables.gcc for its jump dispatch tables since
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63223 / GCC v4.9.2).

            PR ld/32968
    ld/
            * scripttempl/avr.sc: Move the trampolines section after the
            .progmem sections.  Assert that .progmem is in the lower 64 KiB.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to