www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/04/02/01:28:59

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 2 Apr 2010 02:20:11 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [Slightly OT] Need help with GNU ld
Message-ID: <20100402062011.GA4344@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4BB54B0E DOT 4080700 AT benjammin DOT net>
MIME-Version: 1.0
In-Reply-To: <4BB54B0E.4080700@benjammin.net>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019