Re: how to initialize a pointer using data page mode

2010-10-19 Thread Ian Lance Taylor
Phung Nguyen writes: >> It seems that you want to generate two .int statements.  My question is >> whether you can load those in a single load instruction, or whether you >> also need to generate multiple load instructions. > I need to generate multiple load instructions In that case, you need

Re: how to initialize a pointer using data page mode

2010-10-19 Thread Phung Nguyen
> It seems that you want to generate two .int statements.  My question is > whether you can load those in a single load instruction, or whether you > also need to generate multiple load instructions. I need to generate multiple load instructions

Re: how to initialize a pointer using data page mode

2010-10-18 Thread Ian Lance Taylor
Phung Nguyen writes: > Is there any way to change the compilation of a declaration? > char *s = "abc"; > compiled into >.section .rodata > .LCO: >.ascii "abc\0"; >.section .data >.align 1 > _s: >.long .LCO > I would like to change the last line in the above

Re: how to initialize a pointer using data page mode

2010-10-18 Thread Phung Nguyen
Hi all, Is there any way to change the compilation of a declaration? char *s = "abc"; compiled into .section .rodata .LCO: .ascii "abc\0"; .section .data .align 1 _s: .long .LCO I would like to change the last line in the above generated code. What is the hook wh

how to initialize a pointer using data page mode

2010-10-17 Thread Phung Nguyen
Hi all, When compiling a C code containing a global declaration like: char *s = "abc"; The assembly code will be .section .rodata .LC0: .ascii "abc\0" .section .data .align 1 _s: .long .LC0 where the real address of string constant is kept in _s. However,