Start address for text segment in a.out-files?

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Wed Sep 27 03:10:00 GMT 2000


> Date: Wed, 27 Sep 2000 10:54:03 +0200
> From: Orjan Friberg <orjanf@axis.com>

> To me, it seems resonable that gdb should be able to decide the start
> address of the text segment by looking at the entry point from the aout
> header, and adjusting its address to the nearest lower page boundary. I
> reckon the best place for this to happen is in aout-target.h,
> MY(callback).

> Are there any good reasons for not doing this? I'm willing to implement
> this change and submit a patch for it, but I would like some feedback on
> these thoughts. I'm certainly not an expert on headers of a.out files on
> different systems, but if entry point was missing in the a.out header we
> could fall back on using TEXT_START_ADDR the way it is done now.

To get the wanted effect, defining N_TXTADDR in aout-cris.h
would be the right thing, AFAICT.

Or at worst, override MY_callback.  I believe you can even read
symbols there if necessary.

brgds, H-P


More information about the Gdb-patches mailing list