Il 11/03/2010 0.52, Philip Nye ha scritto:
Lennart Sorensen wrote:
On Wed, Mar 10, 2010 at 09:41:53AM -0800, Stern, Allon wrote:
On Mar 10, 2010, at 12:03 PM, Daniele Ziglioli wrote:
In a uclinux (coldfire) C application ,
how can I retrieve the myself data section addresses
(.data,.rodata,.text, etc) ?
m68k-uclinux-objdump -h
If you're on a NOMMU system, then you'll have to do it on the .gdb
executable, which should be built first, then flattened to produce
the final FLAT binary.
Your toolchain prefix may vary.
But they change at load time. The kernel knows them. Does the running
program have any way to find them from the GOT?
Either reference the symbols _stext, _etext _bss etc. directly from
within
your code or add symbols of your own to the ld script? or do I
misunderstand
the question?
e.g:
extern char __bss_start;
...
printf("%lx\n", (unsigned long)&__bss_start);
Philip
You have understand right , know that I've understand how the ld script
export the symbols :-) ....
extern char _stext;
extern char _sdata;
extern char _sbss;
it's ok for me .
tanks a lot.
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
--
/Cordiali saluti,/
*Daniele Ziglioli*
www.signal-elettronica.it <http://www.signal-elettronica.it/>
___________________________________________________________________________
Il contenuto di questo messaggio e ogni file eventualmente allegato è
confidenziale e riservato.
La comunicazione, la diffusione o la riproduzione del messaggio senza
esplicita autorizzazione è vietata.
The content of this message and any attached files are reserved and
confidential.
The communication, the spread or the reproduction of the message without
explicit authorization is prohibited.
__________________________________________________________________________
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev