| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Apr 03, 2008
Posts: 1
![]() |
Hello all, mac fellows!
I am trying to compile some basic low-level programs I had made on Linux, this time with Mac OSX 10.4.9 with Xcode Tools installed, wich gives me a gcc-based enviroment to start coding on MAC OSX. I want to get some low-level memory access trial-and-error fun in the proccess, but I have found &etext and &end aren't defined. In Linux, something like this works flawlessly: extern etext; exter end; main () { printf ("\n&etext = 0x0%d", &etext); printf ("\n&end = 0x0%d", &end);} } In darwin, using gcc 4.0.1, trying to compile it bings some linked problem with undefined symbols: ld can' find where etext or end are defined! I have read they are defined as DATASTART or something, but I've trued to extern those or define them myself with no luck. Please, do you know how can I find the end of the code segment, globals segment, etc, in Darwin?? Where are those defined? How? Thanks!! |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
All times are GMT -4. The time now is 06:09 PM.
Powered by vBulletin