
Dear Mike Frysinger,
In message 201011191908.00162.vapier@gentoo.org you wrote:
the difference is that the linker wont bother looking at the duplicated objects in the archives. from the linker's perspective though, we now have to completely independent objects. the combined one specified on the command line and the split up ones in the linker script.
Right.
one possible way to fix boards is to stop specifying sub-objects in the linker script and only specify the combined ones. so in board/tqc/tqm8xx/u-boot.lds, drop the split objects like lib/zlib.o in favor of the combined one like lib/libgeneric.o. this might not work for everyone since the combined object
It doesn't work as we cannot fine-adjust the size of the combined objects as it's needed for at least coarse adjustment to the available flash sector sizes.
sizes can be a bit large. if everyone was using -ffunction-sections/-fdata- sections
? Could you please complete that sentence?
this however wont work for common/env_embedded.o since it is merged common/libcommon.o. so to fix that, we'll need to not merge env_embedded.o into libcommon.o. like in the patch below. -mike
diff --git a/common/Makefile b/common/Makefile index e0db382..d38aa7b 100644 --- a/common/Makefile +++ b/common/Makefile @@ -52,10 +52,10 @@ COBJS-y += cmd_version.o COBJS-y += env_common.o COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o -COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o -COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o -COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o -COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o +XOBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o +XOBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o +XOBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o +XOBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o COBJS-$(CONFIG_ENV_IS_IN_MG_DISK) += env_mgdisk.o COBJS-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
Is this not too much? We have embedded environment only in the case of NOR flash, so the extra handling should only be done for CONFIG_ENV_IS_EMBEDDED ?
Best regards,
Wolfgang Denk