Sign in to follow this  
Ra

Constant Pointer, Unneeded .rodata

Recommended Posts

struct slice*const free_pool = (struct slice*)0xFF800000;
The line of code above has been driving me *insane* for the past hour or so. For some reason it's storing that constant pointer in the .rodata section.
Disassembly of section .dtext:

c0001000 <.dtext>:
...
c000109c:       8b 15 00 90 00 c0       mov    0xc0009000,%edx
...

Disassembly of section .rodata:

c0009000 <.rodata>:
c0009000:       00 00                   add    %al,(%eax)
c0009002:       80                      .byte 0x80
c0009003:       ff                      .byte 0xff
I can't figure out _why_ it'd do something like that... it should be loaded directly into the register, but it's (obviously) not. Anyone know what might be going on? EDIT: Yes, this is GCC 3.3.3. [Edited by - Ra on August 18, 2004 9:26:06 PM]

Share this post


Link to post
Share on other sites
Wow, nobody's ever come across this? Google doesn't help at all...

I really need to know how I can just get it to generate mov $0xff800000,%edx, it's breaking my project.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this