This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: linker file/section matching rules when using libraries
"Nick Kelsey" <fsf@silicondust.com> writes:
> The library file is build/lib/libipWeb.a
>
> On the commandline I specify: -Lbuild/lib -lipWeb
>
> This works correctly and gets linked in with my normal rule of:
>
> * (.text .text.*)
>
> The follow rule also works:
>
> build/lib/libipWeb.a (.text .text.*)
>
> However if I remove the path it failes dispite having the search path and
> the library included on the command line.
>
> Unfortunatly the build path changes for different projects... the path is
> available to the makefile to pass to the linker but not available to the
> c-preprocessor that generates the linker script.
>
> I suspect that it isn't matching the full lib name from the rule
> (libipWeb.a) against the command line reference (-lipWeb).
Ah, I see.
I'm not sure whether that should work or not.
I suspect that this would work:
-lipWeb (.text .text.*)
Ian