The memory.x file is searched in the current directory and in all directories specified with the -L switch. There is also a default directory which is /usr/m6811-elf/lib or xxx\m6811-elf\lib.

For example, in GEL, the memory.x file is read from the board specific config directory. This is caused by the option:

-L$(GEL_BASEDIR)/config/$(TARGET_BOARD)
        

For example:

-L/opt/gel-hc1x-1.4.2/config/m68hc11-32k
        

and this configuration directory contains the memory.x file that corresponds to the m68hc11-32k generic board.

See Also

What is the memory.x?

User Contributed Notes
triffid_hunter_AT_NOSPAM.funkmunch.net
12-Feb-2006 11:06
#20
The -T (--script) switch allows one to give a specific filename or location for the linker script(s).