Code: Select all
#include <stdio.h>
extern unsigned char* message;
int main()
{
printf("Message is: \"%s\"\n", message);
return 0;
}
Code: Select all
SECTION rodata_user
PUBLIC _message
_message:
defb 0x41, 0x00
where <splat!> is what appears to be random chars as far as the first \0 it happens to find. It compiles and links correctly, but clearly the defb isn't providing a stringz in the format the printf is expecting.
Why would that be?
Also, what's the best source of information for this sort of thing? Where, for example, can I find a description of what the "rodata_user" thing is about?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot