This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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: how to get the correct ld command from gcc


Jibin Han wrote:
> 
> Hi,
>         I am using such command to build an elf image to trigger
> ld: "powerpc-eabi-gcc $(CFLAGS) -Wl,-T,$(LDSFILE) -o $@ boot.o
> $(OBJECTS) -lc $(BSP) -lc $(DRIVER_LIB)". now I want to trigger ld with
> -Map option, I tried appending "-Map mapfile" to the command above, but
> gcc can not recognize it.
>         I then did this way, "powerpc-eabi-ld -Wl,-T,$(LDSFILE) -o $@
> boot.o $(OBJECTS) -lc $(BSP) -lc $(DRIVER_LIB) -Map mapfile", but it says
> can not recognize powerpc-eabi-ld options.
>         could you pint me any method based on this command how to get the
> map info from ld -Map?
> 
> thanks.
> 
> newbie

Jibin,

  To pass options to the link stage, use the -Wl option.  You are
already doing so for the -T option.  Therefore, just add
-Wl,-Map,some-file-name to your invocation.

-- Jeff J.


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