Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

Some compiler/linker systems have such a feature as COMMON segments. Common segment means that all variables from one file defined to be placed in this segment will always be placed starting from the begining of the segment. In turn, this leads that all common segments from several files will share the same memory area.

I did not find this feature in C30/Link30. There is a mention about input segment name "COMMON" in Link30 manual but it does not work. I wrote these lines in the link script file:

.bss : { _bstart = . ; *(.bss) *(COMMON) ; _bend = . ;} and the definitions in several source files like below:

int attribute ((section("COMMON"), aligned(2))) buffer[SUBBLOCK_SIZE*FRAMES]; What is wrong? How one can set a single memory area for two (or more) sets of variables?

Thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900