Jump to content
  • Advertisement
Sign in to follow this  
Ra

Constant Pointer, Unneeded .rodata

This topic is 5147 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!