aboutsummaryrefslogtreecommitdiff
path: root/bfd/aout-cris.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-09-28 21:58:16 +0000
committerHans-Peter Nilsson <hp@axis.com>2000-09-28 21:58:16 +0000
commitb16885a1320f3718c716b66b3858bbe1ccfa2095 (patch)
tree454874f053e6a8f86252a30cade5e420a1fb0786 /bfd/aout-cris.c
parent1bd591624cb3a059a2db9292b0c1f3311ea29c63 (diff)
downloadgdb-b16885a1320f3718c716b66b3858bbe1ccfa2095.zip
gdb-b16885a1320f3718c716b66b3858bbe1ccfa2095.tar.gz
gdb-b16885a1320f3718c716b66b3858bbe1ccfa2095.tar.bz2
* aout-cris.c (N_TXTADDR): Define.
Diffstat (limited to 'bfd/aout-cris.c')
-rw-r--r--bfd/aout-cris.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/bfd/aout-cris.c b/bfd/aout-cris.c
index 36f8553..a531bcb 100644
--- a/bfd/aout-cris.c
+++ b/bfd/aout-cris.c
@@ -28,6 +28,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ENTRY_CAN_BE_ZERO
#define TEXT_START_ADDR 0
+/* Without reading symbols to get the text start symbol, there is no way
+ to know where the text segment starts in an a.out file. Defaulting to
+ anything as constant as TEXT_START_ADDR is bad. But we can guess from
+ the entry point, which is usually within the first 64k of the text
+ segment. We also assume here that the text segment is 64k-aligned.
+ FIXME: It is also wrong to assume that data and bss follow immediately
+ after text, but with those, we don't have any choice besides reading
+ symbol info, and luckily there's no pressing need for correctness for
+ those vma:s at this time. */
+#define N_TXTADDR(x) ((x).a_entry & ~0xffff)
+
/* If you change this to 4, you can not link to an address N*4+2. */
#define SEGMENT_SIZE 2