* Patch for binutils (GAS-980329) for VxWorks on MIPS
@ 1998-03-29 15:46 Don Bowman
1998-03-30 8:34 ` Ian Lance Taylor
0 siblings, 1 reply; 2+ messages in thread
From: Don Bowman @ 1998-03-29 15:46 UTC (permalink / raw)
To: 'gas2@cygnus.com'
Under VxWorks 5.3.1 [The Tornado 1.0.1 release] for the MIPS targets,
gas cannot create a debuggable image. This occurs since the Tornado
target server requires a separate .stab & .stabstr section. It cannot
deal with the .mdebug ecoff section.
The fix is to three main areas:
1: configure: accept 'mips-wrs-vxworks' as a valid configuration target
2: obj-elf.h: allow output to separate sections. The comment that was
there indicated this had been removed due to an Irix 6 limitation. This
may not affect any of the other ELF targets, but I cannot say for
certain:
it certainly does not affect the VxWorks MIPS platform.
3: A fix to ecoff.c: the comment about input_line_pointer pointing to the
beginning of the stab value appears incorrect.
This patch is against GAS-980329
The Changelog entries would be something like:
bfd:
Sun Mar 29 18:32:00 1998 Don Bowman <don@pixsci.com>
* config.bfd: add mips*el-wrs-vxworks and mips*-wrs-vxworks
gas:
Sun Mar 29 18:32:00 1998 Don Bowman <don@pixsci.com>
* configure: add mips*el-wrs-vxworks and mips*-wrs-vxworks
* configure.in: add mips*el-wrs-vxworks and mips*-wrs-vxworks
* obj-elf.h: allow separate stab sections and non-ecoff debugging
for MIPS
* ecoff.c (ecoff_stab): remove erroneous check for valid start of
stab
identifier
The following patch was generated by running:
$ diff -up -r gas-980329 gas-980329.modified
-----------START OF PATCH------------
diff -r -up gas-980329/bfd/config.bfd gas-980329.modified/bfd/config.bfd
--- gas-980329/bfd/config.bfd Sun Mar 29 04:18:24 1998
+++ gas-980329.modified/bfd/config.bfd Sun Mar 29 14:21:33 1998
@@ -423,11 +423,11 @@ case "${targ}" in
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
- mips*el-*-elf*)
+ mips*el-*-elf* | mips*el-wrs-vxworks)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec
bfd_elf64_littlemips_vec"
;;
- mips*-*-elf* | mips*-*-rtems*)
+ mips*-*-elf* | mips*-*-rtems* | mips*-wrs-vxworks)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec
bfd_elf64_littlemips_vec"
;;
diff -r -up gas-980329/gas/config/obj-elf.h
gas-980329.modified/gas/config/obj-elf.h
--- gas-980329/gas/config/obj-elf.h Sun Mar 29 04:10:25 1998
+++ gas-980329.modified/gas/config/obj-elf.h Sun Mar 29 16:55:17 1998
@@ -141,12 +141,18 @@ extern void obj_elf_init_stab_section PA
#define ECOFF_DEBUGGING 1
#endif
+
+#define MIPS_STABS_ELF 1
/* For now, always set ECOFF_DEBUGGING for a MIPS target. */
#ifdef TC_MIPS
+#ifdef MIPS_STABS_ELF
+#define ECOFF_DEBUGGING 0
+#else
#define ECOFF_DEBUGGING 1
-#endif
+#endif /* MIPS_STABS_ELF */
+#endif /* TC_MIPS */
-#if ECOFF_DEBUGGING
+#if (ECOFF_DEBUGGING == 1) || (MIPS_STABS_ELF == 1)
/* If we are generating ECOFF debugging information, we need some
additional fields for each symbol. */
@@ -157,10 +163,12 @@ extern void obj_elf_init_stab_section PA
struct localsym *ecoff_symbol; \
valueT ecoff_extern_size;
+#ifndef MIPS_STABS_ELF
/* We smuggle stabs in ECOFF rather than using a separate section.
The Irix linker can not handle a separate stabs section. */
#undef SEPARATE_STAB_SECTIONS
#undef INIT_STAB_SECTION
+#endif /* MIPS_STABS_ELF */
#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
ecoff_stab ((seg), (what), (string), (type), (other), (desc))
diff -r -up gas-980329/gas/configure gas-980329.modified/gas/configure
--- gas-980329/gas/configure Sun Mar 29 04:30:23 1998
+++ gas-980329.modified/gas/configure Sun Mar 29 17:45:55 1998
@@ -1559,6 +1559,11 @@ EOF
mips-*-lnews*) fmt=ecoff em=lnews ;;
mips-*-riscos*) fmt=ecoff ;;
mips-*-sysv*) fmt=ecoff ;;
+ mips-*-vxworks) fmt=elf
+ cat >> confdefs.h <<\EOF
+#define MIPS_STABS_ELF 1
+EOF
+;;
mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* |
mips-*-openbsd*)
fmt=elf ;;
mn10200-*-*) fmt=elf bfd_gas=yes ;;
diff -r -up gas-980329/gas/configure.in gas-980329.modified/gas/configure.in
--- gas-980329/gas/configure.in Sun Mar 29 04:30:23 1998
+++ gas-980329.modified/gas/configure.in Sun Mar 29 17:46:02 1998
@@ -230,6 +230,9 @@ changequote([,])dnl
mips-*-lnews*) fmt=ecoff em=lnews ;;
mips-*-riscos*) fmt=ecoff ;;
mips-*-sysv*) fmt=ecoff ;;
+ mips-*-vxworks) fmt=elf
+ AC_DEFINE(MIPS_STABS_ELF)
+ ;;
mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* |
mips-*-openbsd*)
fmt=elf ;;
mn10200-*-*) fmt=elf bfd_gas=yes ;;
diff -r -up gas-980329/gas/ecoff.c gas-980329.modified/gas/ecoff.c
--- gas-980329/gas/ecoff.c Sun Mar 29 04:10:15 1998
+++ gas-980329.modified/gas/ecoff.c Sun Mar 29 18:26:30 1998
@@ -3567,11 +3567,18 @@ ecoff_stab (sec, what, string, type, oth
value = get_absolute_expression ();
addend = 0;
}
+#if 0
+/*
+ * I don't believe the comment at the top about input_line_pointer is
+ * correct: it points to the begging of the line, not the
+ * value field of the stab
+*/
else if (! is_name_beginner ((unsigned char) *input_line_pointer))
{
as_warn ("Illegal .stab%c directive, bad character", what);
return;
}
+#endif
else
{
expressionS exp;
diff -r -up gas-980329/ld/configure.tgt gas-980329.modified/ld/configure.tgt
--- gas-980329/ld/configure.tgt Sun Mar 29 04:28:00 1998
+++ gas-980329.modified/ld/configure.tgt Sun Mar 29 13:17:27 1998
@@ -157,6 +157,7 @@ mips*vr5000el-*-elf*) targ_emul=elf32l43
mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
mips*el-*-elf*) targ_emul=elf32elmip ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
+mips*-wrs-vxworks*) targ_emul=elf32ebmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
mips*el-*-linux-gnu*) targ_emul=elf32lsmip
targ_extra_emuls="elf32bsmip mipslit mipsbig"
-----------END OF PATCH------------
--don bowman ( don@pixsci.com 519-884-4196 x2235 )
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch for binutils (GAS-980329) for VxWorks on MIPS
1998-03-29 15:46 Patch for binutils (GAS-980329) for VxWorks on MIPS Don Bowman
@ 1998-03-30 8:34 ` Ian Lance Taylor
0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 1998-03-30 8:34 UTC (permalink / raw)
To: don; +Cc: gas2
From: Don Bowman <don@pixsci.com>
Date: Sun, 29 Mar 1998 18:46:03 -0500
Under VxWorks 5.3.1 [The Tornado 1.0.1 release] for the MIPS targets,
gas cannot create a debuggable image. This occurs since the Tornado
target server requires a separate .stab & .stabstr section. It cannot
deal with the .mdebug ecoff section.
The fix is to three main areas:
1: configure: accept 'mips-wrs-vxworks' as a valid configuration target
2: obj-elf.h: allow output to separate sections. The comment that was
there indicated this had been removed due to an Irix 6 limitation. This
may not affect any of the other ELF targets, but I cannot say for
certain:
it certainly does not affect the VxWorks MIPS platform.
The .mdebug section is required on Irix 5, because the Irix 5 linker
can not handle .stab/.stabstr sections. I do not believe the .mdebug
section is required on Irix 6, although gas doesn't support Irix 6
anyhow so I haven't tested this.
It appears that your patch will always generate .stab/.stabstr
sections, even on Irix 5, since MIPS_STABS_ELF is always defined in
obj-elf.h in your patch.
Presumably WRS ships a toolchain which permits debugging for MIPS
targets. What do they do?
3: A fix to ecoff.c: the comment about input_line_pointer pointing to the
beginning of the stab value appears incorrect.
This appears unrelated to the other issues. Can you send a test case
for this? As far as I can tell from s_stab_generic,
input_line_pointer will indeed point to the start of the value when
ecoff_stab is called. Without a test case, I can't judge whether your
patch is appropriate.
Ian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-03-30 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-29 15:46 Patch for binutils (GAS-980329) for VxWorks on MIPS Don Bowman
1998-03-30 8:34 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).