delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=1.2 required=5.0 tests=BAYES_00,TBC,TW_CP,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4BB54B0E.4080700@benjammin.net> |
Date: | Thu, 01 Apr 2010 20:40:30 -0500 |
From: | Ben Kamen <bkamen AT benjammin DOT net> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | [Slightly OT] Need help with GNU ld |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |