This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linker generated "subsections"


On Thu, 29 Jan 2009, H.J. Lu wrote:

Is this

http://www.sourceware.org/bugzilla/show_bug.cgi?id=349

Almost. The behavior I observed did not involve the -r flag or an i686. Also, it did not involve differing allocation flags. The section got its name from a GNU C attribute.

Apparently ld behaves differently for different platforms:
The bug report is from 2004,
but the problem didn't show up in winAVR until 2006.

That said, ld's output is as complained of in bugzilla,
it's just that the trigger is not as described.

Apparently it's not going to be fixed.

Ah. Well. ld is worth more than what I paid for it.

On Thu, Jan 29, 2009 at 1:36 PM, Michael Hennebry
<hennebry@web.cs.ndsu.nodak.edu> wrote:
avr-ld will mangle the names of user-named sections.
If I try to name a section "fred",
code in the first file to use that section name
will be put in section fred.
Code in the subsequent files will be put
in section fred.1, fred.2 and so forth.
When I first encountered this,
it defeated my effort to make a multi-file bootloader.

Where is the documentation on this?
On this matter, google has not been my friend.

I can't even find any documentation that says it will do that,
much less how to fix it.

C:\ATMel_PROJ\backlight\image\build>avr-ld --version
GNU ld (GNU Binutils) 2.18 (WinAVR 20080610)
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later
version.
This program has absolutely no warranty.

--
Michael   hennebry@web.cs.ndsu.NoDak.edu
"Pessimist: The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be."




-- H.J.


-- Michael hennebry@web.cs.ndsu.NoDak.edu "Pessimist: The glass is half empty. Optimist: The glass is half full. Engineer: The glass is twice as big as it needs to be."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]