diff options
7 files changed, 26 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mcp750.cfg b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mcp750.cfg index 8ff97b3a1a..98e8fd9055 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mcp750.cfg +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mcp750.cfg @@ -8,12 +8,15 @@ RTEMS_CPU=powerpc RTEMS_CPU_MODEL=mpc750 # This contains the compiler options necessary to select the CPU model -# and (hopefully) optimize for it. +# and (hopefully) optimize for it. # CPU_CFLAGS = -mcpu=750 -Dmpc750 # optimize flag: typically -O2 CFLAGS_OPTIMIZE_V = -O2 -g -mmultiple -mstring -mstrict-align +CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections + +LDFLAGS = -Wl,--gc-sections define bsp-post-link $(default-bsp-post-link) diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mtx603e.cfg b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mtx603e.cfg index 6c7f59787c..aa91b05be2 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mtx603e.cfg +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mtx603e.cfg @@ -8,11 +8,14 @@ RTEMS_CPU=powerpc RTEMS_CPU_MODEL=mpc6xx # This contains the compiler options necessary to select the CPU model -# and (hopefully) optimize for it. +# and (hopefully) optimize for it. CPU_CFLAGS = -mcpu=603e -Dppc603e # optimize flag: typically -O2 CFLAGS_OPTIMIZE_V = -O2 -g -mmultiple -mstring -mstrict-align +CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections + +LDFLAGS = -Wl,--gc-sections define bsp-post-link $(default-bsp-post-link) diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2100.cfg b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2100.cfg index d724b5dd1e..dadb275a04 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2100.cfg +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2100.cfg @@ -8,11 +8,14 @@ RTEMS_CPU=powerpc RTEMS_CPU_MODEL=mpc8240 # This contains the compiler options necessary to select the CPU model -# and (hopefully) optimize for it. +# and (hopefully) optimize for it. CPU_CFLAGS = -mcpu=603e -Dppc603e # optimize flag: typically -O2 CFLAGS_OPTIMIZE_V = -O2 -g -mmultiple -mstring -mstrict-align +CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections + +LDFLAGS = -Wl,--gc-sections define bsp-post-link $(default-bsp-post-link) diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2307.cfg b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2307.cfg index ee00561d01..cf2ab28a4b 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2307.cfg +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/mvme2307.cfg @@ -8,12 +8,15 @@ RTEMS_CPU=powerpc RTEMS_CPU_MODEL=mpc604 # This contains the compiler options necessary to select the CPU model -# and (hopefully) optimize for it. +# and (hopefully) optimize for it. # -CPU_CFLAGS = -mcpu=604 -mmultiple -mstring -mstrict-align -meabi +CPU_CFLAGS = -mcpu=604 -mmultiple -mstring -mstrict-align -meabi # optimize flag: typically -O2 CFLAGS_OPTIMIZE_V = -O2 -g +CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections + +LDFLAGS = -Wl,--gc-sections define bsp-post-link $(default-bsp-post-link) diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep-altivec.cfg b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep-altivec.cfg index 1dd1744a4d..87fbb25457 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep-altivec.cfg +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep-altivec.cfg @@ -8,12 +8,15 @@ RTEMS_CPU=powerpc RTEMS_CPU_MODEL=mpc7400 # This contains the compiler options necessary to select the CPU model -# and (hopefully) optimize for it. +# and (hopefully) optimize for it. # CPU_CFLAGS = -mcpu=7400 -mmultiple -mstring -mstrict-align -D__ppc_generic # optimize flag: typically -O2 CFLAGS_OPTIMIZE_V = -O2 -g +CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections + +LDFLAGS = -Wl,--gc-sections ifdef PURE_BINARY define bsp-post-link diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep.cfg b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep.cfg index e5f11fc468..36df4afa32 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep.cfg +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/make/custom/qemuprep.cfg @@ -8,12 +8,15 @@ RTEMS_CPU=powerpc RTEMS_CPU_MODEL=mpc604 # This contains the compiler options necessary to select the CPU model -# and (hopefully) optimize for it. +# and (hopefully) optimize for it. # CPU_CFLAGS = -mcpu=powerpc -mmultiple -mstring -mstrict-align -D__ppc_generic # optimize flag: typically -O2 CFLAGS_OPTIMIZE_V = -O2 -g +CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections + +LDFLAGS = -Wl,--gc-sections ifdef PURE_BINARY define bsp-post-link diff --git a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds index d0d22a774e..a18382bd14 100644 --- a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds +++ b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds @@ -13,7 +13,7 @@ SECTIONS { .entry_point_section : { - *(.entry_point_section) + KEEP(*(.entry_point_section)) } > VECTORS /* |