From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30603 invoked by alias); 27 May 2014 11:48:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30559 invoked by uid 48); 27 May 2014 11:48:45 -0000 From: "senthil_kumar.selvaraj at atmel dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/61044] Computed goto on AVR fails to use word-addressing Date: Tue, 27 May 2014 11:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: senthil_kumar.selvaraj at atmel dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02319.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61044 --- Comment #3 from Senthil Kumar Selvaraj --- Johann, The primary reason I added the diff relocs was to prevent linker relaxation messing up DWARF line number information - as you know, relaxation can shorten instruction sequences, and the addresses in DWARF then go out of sync. I guess I must add some user documentation about this, but ideally, this is supposed to be transparent to the user - just passing -mrelax to the compiler should work. I turned diff reloc generation on only if -mlink-relax is passed because this is what other ports (xtensa) do, and I wasn't sure of the consequences of resolving every subtraction expression at link time. I tried assembling .word pm(.L3-.L2) with -mlink-relax, but the assembler gave up with an "expression too complex" error. Like you said, I guess documenting that this is not supported is the way to go.