What steps will reproduce the problem?
Run the following script.
cat > x.c << \!
int a = 10;
!
cat > t.c << \!
#define STACK_SIZE 0x8000
int count;
char __attribute__ ((aligned(16))) stack1[STACK_SIZE];
!
gcc -c -fPIC x.c t.c -m32
ld.mcld -march x86 x.o t.o -shared -o bss.mcld
/usr/bin/ld -m elf_i386 x.o t.o -shared -o bss.ld
readelf -S bss.mcld | grep '.bss'
readelf -S bss.ld | grep '.bss'
What is the expected output? What do you see instead?
Expect alignment of bss to be 16.
What version of the product are you using? On what operating system?
Trunk.
Please provide any additional information below.
Whenever a symbol is moved from common to bss, the alignment from the common
symbol should be updated so that the bss section is aligned appropriately.
This is what has been done in Hexagon to fix the problem in
allocateCommonSymbols.
if ((*com_sym)->value() > bss_sect_data->getSection().align()) {
bss_sect_data->getSection().setAlign((*com_sym)->value());
}
Original issue reported on code.google.com by shanka...@gmail.com on 1 Jun 2013 at 12:10
Original issue reported on code.google.com by
shanka...@gmail.com
on 1 Jun 2013 at 12:10