[binutils-gdb] AVR: Repair avr-prop-6.d by linking with --no-elide-rjmp0

Georg-Johann Lay gjl@sourceware.org
Fri Aug 21 16:02:07 GMT 2026


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

commit 02d2394808d8f9c68245d4d1bbb74fb2e9ccd974
Author: Georg-Johann Lay <avr@gjlay.de>
Date:   Fri Aug 21 17:50:00 2026 +0200

    AVR: Repair avr-prop-6.d by linking with --no-elide-rjmp0
    
    avr-prop-6.d uses a JMP instruction that targets a global
    label right after it, which is relaxed  to RJMP .+0,
    and that no-op is then removed.  Outcome is that the
    expectation of the test case is violated.
    
    The fix is to link with --no-elide-rjmp0 to retain the RJMP.
    
    ld/
            * testsuite/ld-avr/avr-prop-6.d (ld): Add --no-elide-rjmp0.

Diff:
---
 ld/testsuite/ld-avr/avr-prop-6.d | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ld/testsuite/ld-avr/avr-prop-6.d b/ld/testsuite/ld-avr/avr-prop-6.d
index 1bf8aa13725..0f6a6252b3d 100644
--- a/ld/testsuite/ld-avr/avr-prop-6.d
+++ b/ld/testsuite/ld-avr/avr-prop-6.d
@@ -1,6 +1,6 @@
 #name: AVR .avr.prop, single .align sym at end of section test.
 #as: -mavrxmega2 -mlink-relax
-#ld: -mavrxmega2 --relax
+#ld: -mavrxmega2 --relax --no-elide-rjmp0
 #source: avr-prop-6.s
 #objdump: -S
 #target: avr-*-*


More information about the Binutils-cvs mailing list