
Dear Albert ARIBAUD,
In message 4CCD3A6F.7040303@free.fr you wrote:
The first test I did with a sample program which contains the three types of static scope objects: const, initialized and uninitialized, and I checked that the inititialized one lands in BSS which has NOBITS while explicitely initialized objects land in data sections with PROGBITS -- that's akin to the LOAD attribute.
Thanks for checking.
Both the ELDK 4.2 and the CS toolchains' linkers treat all three object types the same way with respect to relocation, and emit relocations to the uninitialized object, so not having LOAD attribute is irrelevant -- BTW if it was, BSS relocation would never have worked.
Yes, I know. My speculation was that suchbehaviour (or linker options to adjust it) might have changed in more recent versions of gcc/binutils.
BTW: I would like to point out that so far we're blaming GCC, which is not exaclt correct, as we always tested GCC+Binutils combos. For completeness, we should separate compilation and linking and test for example ELDK's gcc with CS's ld, and vice versa. Hope I will find some time later this night. Hope the ghosts won't make too much of a noise.
Best regards,
Wolfgang Denk