This is the mail archive of the cygwin mailing list for the Cygwin 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: [Slightly OT] Need help with GNU ld

On Thu, Apr 01, 2010 at 08:40:30PM -0500, Ben Kamen wrote:
>I'm sort of lost as to where I might even start with this, and since
>this group is so fluent (I'm guessing) with GCC, I'm hoping someone
>here can either answer or point me to where I can go look.
>(I'm looking on the's gplusplus list and am not sure if that's
>a good source since it seems kind of dead)
>Anyway - here's my problem.
>I'm working on an embedded app that uses GCC for its compiler.
>I have 2 pieces of code that share common library functions from libc.a
>like memcpy and strlen
>Because the two pieces are a bootloader and the application, I would
>like the bootloader to be linked with a completely private set of
>functions which INCLUDEs the library calls they make.
>This would duplicate those libc.a calls like memcpy() and strlen()
>inside the bootloader portion.
>So my question is (and I might be looking in the wrong place to do
>this, but it seems like 'ld' would take care of it):
>How do I tell the ld that for bootloader.o, all library references like
>memcpy() should be inlined/included with that function.  I've got all
>the functions in the bootloader corralled into the memory space I want,
>but the functions called in libc.a are shared.
>'static' only works for the immediate function while any calls to a
>libc.a function get shared with the main application.
>I've already tried the forum for the micro-controller I'm using..  but
>apparently, it's new enough that I'm too far ahead on the curve for
>anyone else to help me.  (even from the company)
>Thanks in advance and sorry for bugging all of you here..  if I hear
>crickets, I'll try and keep digging elsewhere.

This is more than slightly offtopic here.  It's completely offtopic.

Please find another forum.  Sorry.


Problem reports:
Unsubscribe info:

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