From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7866 invoked by alias); 28 May 2014 17:29:13 -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 7824 invoked by uid 48); 28 May 2014 17:29:09 -0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/61044] Computed goto on AVR fails to use word-addressing Date: Wed, 28 May 2014 17:29: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: gjl at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.1 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/msg02437.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61044 --- Comment #9 from Georg-Johann Lay --- (In reply to Senthil Kumar Selvaraj from comment #3) > 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. Resolving label differences at assemble time serves a faster linking process, but that argument does not apply to avr: We don't have magabytes of code that have to be fixed at load time by a dynamic linker. And you don't know at assemble time how the linker is called. One example is debugging through code that comes from a library and has been linked against the application. It's not very common but possible and yet another plus (besides simplicity with less options and less GCC/Binutils dependency) for always emitting label differences as relocs.