This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with linking static lib text into specific section
Hi,
I have tried changing the exclude rule as suggested but still the same error.
Does my new section rules are O.K?
Thanks
Elad
On Mon, Mar 5, 2012 at 9:57 PM, Ian Lance Taylor <iant@google.com> wrote:
> Elad Yosef <elad.yosef@gmail.com> writes:
>
>> When I add the new lib the ld file has these changes
>>
>>
>> #define SECTION_text(_region_, _vma_, _lma_) ? \
>> ? .text _vma_ : _lma_ ? ? ? ? ? ? ? ? ? ? ? ? ?\
>> ? ? { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
>> ? ? ? _stext = .; _ftext = . ; ? ? ? ? ? ? ? ? \
>> ? ? ?*(EXCLUDE_FILE (*libMy-Cli.a) .text) ? ?\
>> ? ? ?*(EXCLUDE_FILE (*libMy-Cli.a) .text.*) ?\
>> ? ? ?*(EXCLUDE_FILE (*libMy-ATP-GUI.a) .text) ? ?\ ? ? --- New LIB
>> ? ? ?*(EXCLUDE_FILE (*libMy-ATP-GUI.a) .text.*) ?\ ? ? --- New LIB
>
> I don't see how that could work. ?The first EXCLUDE_FILE will match the
> second library, and the second EXCLUDE_FILE will match the first
> library. ?I think you need to write something like
>
> ?*(EXCLUDE_FILE (*libMy-Cli.a *libMy-ATP-GUI.a) .text .text.*)
>
> Ian