Re: Linking objects with GNU LD
- From: "Hans Odeberg" <hans_odeberg@xxxxxxxxx>
- Date: 27 Feb 2006 02:29:52 -0800
Karl-Heinz wrote:
Hi everybody,
I am using the GNU GCC toolchain configured for m68k (cross compiler).
I want to link several objects into an executable file. Unfortunately
there are several c-functions compiled into one object but I don't want
to use all functions in my executable. Looking into the map file I can
see the unused functions in my executable. Is there a way to avoid this
functions being in the executable (apart from splitting the functions
in the c file)?
Thanks in advance
The gcc options -ffunction-sections and -fdata-sections will generate
separate sections for the functions and data items in a file. (Assuming
the output format can support this.)
The ld option --gc-sections will remove unreferenced sections.
.
- References:
- Linking objects with GNU LD
- From: Karl-Heinz
- Linking objects with GNU LD
- Prev by Date: Re: anyone have an ancient SDS tool suite?
- Next by Date: Re: What is the difference between eCos and redboot?
- Previous by thread: Linking objects with GNU LD
- Next by thread: <INTEGRITY RTOS> Error "ObjectTableIsFull" while CreateProtectedTask()
- Index(es):
Relevant Pages
|