Re: [Slightly OT] Need help with GNU ld

2010-04-02 Thread Christopher Faylor
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 gnu.org'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.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: [Slightly OT] Need help with GNU ld

2010-04-02 Thread Ben Kamen

On 4/2/2010 1:20 AM, Christopher Faylor wrote:


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

Please find another forum.  Sorry.


Not really. I figured there could be a few here who are somewhat gcc saavy. 
Maybe I'd be lucky enough to find someone who could help me learn this... 
offlist.

Never hurts to ask?

Anyway - sorry to bother.

Moving along...

 -Ben

--
Ben Kamen - O.D.T., S.P.
==
Email: bkamen AT benjammin DOT net   Web: http://www.benjammin.net

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: [Slightly OT] Need help with GNU ld

2010-04-02 Thread Dave Korn
On 02/04/2010 15:06, Ben Kamen wrote:
 On 4/2/2010 1:20 AM, Christopher Faylor wrote:

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

 Please find another forum.  Sorry.
 
 Not really. I figured there could be a few here who are somewhat gcc
 saavy. 

  From the title of your post, it sounds like you want help with GNU ld.  Try
the binutils list: see the foot of the page for subscribe/address/archive 
details:

  http://sourceware.org/binutils/

cheers,
  DaveK

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



[Slightly OT] Need help with GNU ld

2010-04-01 Thread Ben Kamen

Hi all,

 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 gnu.org'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.

 -Ben


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple