Linker question. How to change memory section for functions that comes from a ".a" library?

CortexFan giancarlo.parodi@gmail.com
Thu Dec 16 11:36:00 GMT 2010


Hi Olof,
I stumbled upon this searching for a similar question as had a similar
problem.
Depending on the system you use, the slash might be a problem.
I am using codesourcery tools on windows and looking at the verbose output I
noticed what was linked in for the library.
I had to use the following patterns:

        *\libgcc.a:*
        *\libc.a:*

to make it work (note the backslash).

Hope this helps!
Best regards
Giancarlo


foolo wrote:
> 
> Thanks for answering.
> I have now tried different variants of your suggestion, however I see
> no change in the resulting elf file. The functions do not move.
> //Olof
> 
> 
> 2010/12/3 Ian Lance Taylor <iant@google.com>
>>
>> foolo <olof.andersson@gmail.com> writes:
>>
>> > So the question is:
>> > How do i tell the linker to put the needed libgcc functions in a
>> special
>> > memory section.
>>
>> I believe you need to write something like
>>    libgcc.a:*
>> to match all the objects being pulled in from libgcc.a.  But since
>> libgcc.a is coming from some path, you may need something like
>>    */libgcc.a:*
>>
>> Ian
> 
> 
> 
> --
> Olof Andersson
> Mårdtorpsgatan 31
> 58432 Linköping
> tel. +46737049186
> 
> 
> 
> 
> --
> Olof Andersson
> Mårdtorpsgatan 31
> 58432 Linköping
> tel. +46737049186
> 
> 

-- 
View this message in context: http://old.nabble.com/Linker-question.-How-to-change-memory-section-for-functions-that-comes-from-a-%22.a%22-library--tp30365738p30471822.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list