* [patch 0/3] Fix some FAILS for: unordered .debug_info references to .debug_ranges
@ 2009-09-07 3:32 Jan Kratochvil
2009-09-09 9:31 ` Alan Modra
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2009-09-07 3:32 UTC (permalink / raw)
To: binutils
Hi,
as I did not run the testsuite for all the targets there are now some new
FAILs on less-usual arches for the new test:
unordered .debug_info references to .debug_ranges
from
[patch] Support unordered .debug_info references to .debug_ranges
http://sourceware.org/ml/binutils/2009-07/msg00123.html
Attached patches fix some of those, there remain the following FAILs which are
IMO bugs in the targets and I did not fix them as it is out of my scope/time.
Thanks,
Jan
------------------------------------------------------------------------------
d30v-elf FAIL
Pointers get aligned even in the .debuginfo where no alignment should occur.
The pointer at offset 8 should have been at offset 6. readelf then cannot cope
with such aligned content:
Contents of section .debug_info:
0000 00000018 00020000 00000000 04010000 ................
0010 00000010 02410000 00000000 .....A......
Relocation section '.rela.debug_info' at offset 0x494 contains 1 entries:
Offset Info Type Sym. Value Symbol's Name + Addend
00000008 00000f0c R_D30V_32_NORMAL 00000000 .debug_abbrev + 0
readelf: Warning: Bogus end-of-siblings marker detected at offset b in .debug_info section
readelf: Warning: DIE at offset c refers to abbreviation number 4 which does not exist
readelf: Warning: Unable to load/parse the .debug_info section, so cannot interpret the .debug_ranges section.
------------------------------------------------------------------------------
moxie-elf FAIL
pj-elf FAIL
readelf should know how to both read and process the relocation:
readelf: Error: Missing knowledge of 32-bit reloc types used in DWARF sections of machine number 65261
Relocation section '.rela.debug_info' at offset 0x490 contains 1 entries:
Offset Info Type Sym. Value Symbol's Name + Addend
00000006 00000f01 unrecognized: 1 00000000 .debug_abbrev + 0
------------------------------------------------------------------------------
ia64-hp-hpux11.23 FAIL
Like above.
readelf: Warning: unable to apply unsupported reloc type 100 to section .debug_ranges
readelf: Warning: unable to apply unsupported reloc type 100 to section .debug_ranges
readelf: Warning: unable to apply unsupported reloc type 100 to section .debug_ranges
readelf: Warning: unable to apply unsupported reloc type 100 to section .debug_ranges
readelf: Warning: unable to apply unsupported reloc type 100 to section .debug_info
readelf: Warning: There is a hole [0x8 - 0x10] in .debug_ranges section.
------------------------------------------------------------------------------
mep-elf UNRESOLVED
This error is common even for other testcases on this target.
Assembler messages:
Fatal error: selected target format 'elf32-mep-little' unknown
------------------------------------------------------------------------------
mmix-elf UNRESOLVED
This error is common even for other testcases on this target.
There are many such errors like:
ERROR: .../binutils-all/group*.s: assembly failed
testranges.s: Assembler messages:
testranges.s:11: Error: junk at end of line, first unrecognized character is `,'
testranges.s:22: Error: junk at end of line, first unrecognized character is `,'
testranges.s:41: Error: junk at end of line, first unrecognized character is `,'
------------------------------------------------------------------------------
xtensa-elf FAIL
Some fixes are attached but there still remains this FAIL. IMO because the
RELA (not REL) relocations for .debug_ranges should contain the offsets (1, 2,
0, 2) as their "Addend"s. This way RELA resolving clears .debug_ranges.
Contents of the .debug_ranges section:
Offset Begin End
00000000 <End of list>
readelf: Warning: There is a hole [0x8 - 0x10] in .debug_ranges section.
00000010 <End of list>
Contents of section .debug_ranges:
0000 00000001 00000002 00000000 00000000 ................
0010 00000000 00000002 00000000 00000000 ................
Relocation section '.rela.debug_ranges' at offset 0x4dc contains 4 entries:
Offset Info Type Sym. Value Symbol's Name + Addend
00000000 00000101 R_XTENSA_32 00000000 .text + 0
00000004 00000101 R_XTENSA_32 00000000 .text + 0
00000010 00000101 R_XTENSA_32 00000000 .text + 0
00000014 00000101 R_XTENSA_32 00000000 .text + 0
On a more common arch "Addend"s are filled in:
Relocation section '.rela.debug_ranges' at offset 0x630 contains 4 entries:
Offset Info Type Symbol's Value Symbol's Name + Addend
0000000000000000 000000010000000a R_X86_64_32 0000000000000000 .text + 1
0000000000000004 000000010000000a R_X86_64_32 0000000000000000 .text + 2
0000000000000010 000000010000000a R_X86_64_32 0000000000000000 .text + 0
0000000000000014 000000010000000a R_X86_64_32 0000000000000000 .text + 2
------------------------------------------------------------------------------
sh64-superh-linux-gnu FAIL
I did not see why .text starts at 0x1 (and not 0x0 as usual). Maybe the test
should be disabled instead.
Contents of the .debug_ranges section:
Offset Begin End
00000000 00000002 00000003
00000000 <End of list>
00000010 00000001 00000003
00000010 <End of list>
Contents of section .debug_ranges:
0000 02000000 03000000 00000000 00000000 ................
0010 01000000 03000000 00000000 00000000 ................
Relocation section '.rela.debug_ranges' at offset 0x460 contains 4 entries:
Offset Info Type Sym. Value Symbol's Name + Addend
00000000 00000101 R_SH_DIR32 00000000 .text + 0
00000004 00000101 R_SH_DIR32 00000000 .text + 0
00000010 00000101 R_SH_DIR32 00000000 .text + 0
00000014 00000101 R_SH_DIR32 00000000 .text + 0
------------------------------------------------------------------------------
Targets under the test:
alpha-dec-vms alpha-linux-gnu alpha-netbsd alpha-unknown-freebsd4.7
alpha-unknown-osf4.0 am33_2.0-linux arc-elf arm-aout arm-eabi arm-elf
arm-epoc-pe arm-netbsdelf arm-nto arm-pe arm-rtems arm-vxworks arm-wince-pe
avr-elf bfin-elf c30-aout c4x-coff calmrisc16-elf calmrisc32-elf cr16-elf
cr16c-elf cris-elf crx-elf cy16-elf d10v-elf d30v-elf dlx-elf fido-elf
fr30-elf frv-elf frv-linux frv-uclinux h8300-coff h8300-elf hppa-linux-gnu
hppa64-hp-hpux11.11 hppa64-hp-hpux11.23 i386-elf i386-netware
i386-unknown-go32 i686-pc-cygwin i686-pc-elf i686-pc-linux-gnu i960-coff
ia64-elf ia64-hp-hpux11.23 ia64-linux ia64-linux-gnu ia64-x-freebsd5 ip2k-elf
ip4k-elf iq2000-elf lm32-elf m32c-elf m32r-elf m68hc11-elf m68hc12-elf
m68k-aout m68k-coff m68k-elf m68k-linux-gnu m68k-rtems m68k-uclinux m88k-coff
maxq-coff mcore-elf mcore-pe mep-elf mingw32-pe mips-elf mips-sgi-irix5
mips-wrs-vxworks mips64-linux mips64vr-elf mips64vrel-elf mipsel-linux-gnu
mipsisa32-elf mipsisa64-elf mmix-elf mmix-mmixware mn10200-elf mn10300-elf
moxie-elf msp430-elf mt-elf nios-elf ns32k-netbsd openrisc-elf or32-coff
or32-elf pdp11-dec-bsd pj-elf powerpc-eabisim powerpc-eabispe powerpc-elf
powerpc-ibm-aix4.3.3.0 powerpc-linux-gnu powerpc-nto powerpc-wrs-vxworks
powerpc64-linux-gnu ppc-linux rs6000-aix4.3.3 rx-elf s390-linux s390x-ibm-tpf
sh-coff sh-elf sh-hms sh-linux sh-nto sh-symbianelf sh64-elf
sh64-superh-linux-gnu shl-unknown-netbsdelf1.6T sparc-elf sparc-linux-gnu
sparc64-linux-gnu sparc64-netbsd spu-elf tic54x-coff tx39-elf v850-elf
v850e-elf vax-netbsdelf x86_64-linux x86_64-mingw32 x86_64-pc-linux-gnu
x86_64-pc-mingw64 xscale-elf xstormy16-elf xtensa-elf z8k-coff
------------------------------------------------------------------------------
Targets no longer supported as primary target:
c30-aout calmrisc16-elf calmrisc32-elf cr16c-elf cy16-elf h8300-coff i960-coff
ip4k-elf m68k-aout m68k-coff m88k-coff maxq-coff nios-elf or32-coff rx-elf
sh-coff sh-hms x86_64-pc-mingw64
------------------------------------------------------------------------------
These targets:
i686-pc-cygwin mingw32-pe x86_64-mingw32
fail on
./configure --target=$TARGET --enable-targets=all; make
with
config/tc-i386.c: In function 'i386_target_format':
config/tc-i386.c:8099: error: duplicate case value
config/tc-i386.c:8088: error: previously used here
This failure was already present before my patch
[patch 1/4] Fix compilation for i386-unknown-go32 with secondary as elf
http://sourceware.org/ml/binutils/2009-08/msg00152.html
and I will post a separate patch for it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 0/3] Fix some FAILS for: unordered .debug_info references to .debug_ranges
2009-09-07 3:32 [patch 0/3] Fix some FAILS for: unordered .debug_info references to .debug_ranges Jan Kratochvil
@ 2009-09-09 9:31 ` Alan Modra
2009-09-09 10:43 ` Jan Kratochvil
0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2009-09-09 9:31 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: binutils
On Mon, Sep 07, 2009 at 05:32:18AM +0200, Jan Kratochvil wrote:
> These targets:
> i686-pc-cygwin mingw32-pe x86_64-mingw32
>
> fail on
> ./configure --target=$TARGET --enable-targets=all; make
>
> with
> config/tc-i386.c: In function 'i386_target_format':
> config/tc-i386.c:8099: error: duplicate case value
> config/tc-i386.c:8088: error: previously used here
>
> This failure was already present before my patch
> [patch 1/4] Fix compilation for i386-unknown-go32 with secondary as elf
> http://sourceware.org/ml/binutils/2009-08/msg00152.html
>
> and I will post a separate patch for it.
I haven't yet seen a patch for this problem, so I'm going ahead and
committing this one.
* config/tc-i386.c (i386_target_format): Avoid duplicate case label.
Index: gas/config/tc-i386.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.391
diff -u -p -r1.391 tc-i386.c
--- gas/config/tc-i386.c 29 Aug 2009 22:10:59 -0000 1.391
+++ gas/config/tc-i386.c 9 Sep 2009 07:34:06 -0000
@@ -8084,20 +8084,21 @@ i386_target_format (void)
as_fatal (_("Unknown architecture"));
switch (OUTPUT_FLAVOR)
{
-#if defined (TE_PE) || defined (TE_PEP)
- case bfd_target_coff_flavour:
- return flag_code == CODE_64BIT ? "pe-x86-64" : "pe-i386";
-#endif
-#ifdef OBJ_MAYBE_AOUT
+#if defined (OBJ_MAYBE_AOUT) || defined (OBJ_AOUT)
case bfd_target_aout_flavour:
return AOUT_TARGET_FORMAT;
#endif
-#ifdef TE_GO32
+#if defined (OBJ_MAYBE_COFF) || defined (OBJ_COFF)
+# if defined (TE_PE) || defined (TE_PEP)
+ case bfd_target_coff_flavour:
+ return flag_code == CODE_64BIT ? "pe-x86-64" : "pe-i386";
+# elif defined (TE_GO32)
case bfd_target_coff_flavour:
return "coff-go32";
-#elif defined (OBJ_MAYBE_COFF)
+# else
case bfd_target_coff_flavour:
return "coff-i386";
+# endif
#endif
#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF)
case bfd_target_elf_flavour:
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 0/3] Fix some FAILS for: unordered .debug_info references to .debug_ranges
2009-09-09 9:31 ` Alan Modra
@ 2009-09-09 10:43 ` Jan Kratochvil
2009-09-09 13:19 ` Alan Modra
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2009-09-09 10:43 UTC (permalink / raw)
To: binutils
On Wed, 09 Sep 2009 11:31:39 +0200, Alan Modra wrote:
> I haven't yet seen a patch for this problem, so I'm going ahead and
> committing this one.
>
> * config/tc-i386.c (i386_target_format): Avoid duplicate case label.
It was still only planned, I did not know much this code.
Thanks,
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 0/3] Fix some FAILS for: unordered .debug_info references to .debug_ranges
2009-09-09 10:43 ` Jan Kratochvil
@ 2009-09-09 13:19 ` Alan Modra
0 siblings, 0 replies; 4+ messages in thread
From: Alan Modra @ 2009-09-09 13:19 UTC (permalink / raw)
To: binutils
And the rest of the patch..
You can't define macros like USE_UNIQUE in obj-coff.h and expect
them to affect symbols.c if you are compiling multi-obj. In that
case, obj-format.h includes obj-multi.h, not obj-coff.h.
* config/obj-coff.h (USE_UNIQUE): Don't define.
* config/obj-coff.c (weak_uniquify): Use an_external_name when TE_PE.
* symbols.c (an_external_name): Define when TE_PE.
(S_SET_EXTERNAL): Assign an_external_name when TE_PE.
* tc.h (an_external_name): Declare when TE_PE.
Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.96
diff -u -p -r1.96 symbols.c
--- gas/symbols.c 29 Jul 2009 06:22:12 -0000 1.96
+++ gas/symbols.c 9 Sep 2009 13:04:23 -0000
@@ -59,7 +59,7 @@ symbolS abs_symbol;
#define LOCAL_LABEL_CHAR '\002'
struct obstack notes;
-#ifdef USE_UNIQUE
+#ifdef TE_PE
/* The name of an external symbol which is
used to make weak PE symbol names unique. */
const char * an_external_name;
@@ -2204,7 +2204,7 @@ S_SET_EXTERNAL (symbolS *s)
s->bsym->flags |= BSF_GLOBAL;
s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
-#ifdef USE_UNIQUE
+#ifdef TE_PE
if (! an_external_name && S_GET_NAME(s)[0] != '.')
an_external_name = S_GET_NAME (s);
#endif
Index: gas/tc.h
===================================================================
RCS file: /cvs/src/src/gas/tc.h,v
retrieving revision 1.16
diff -u -p -r1.16 tc.h
--- gas/tc.h 2 Sep 2009 07:24:19 -0000 1.16
+++ gas/tc.h 9 Sep 2009 13:04:23 -0000
@@ -41,7 +41,7 @@ extern int md_short_jump_size;
extern int md_long_jump_size;
#endif
-#ifdef USE_UNIQUE
+#ifdef TE_PE
/* The name of an external symbol which is
used to make weak PE symbol names unique. */
extern const char * an_external_name;
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.c,v
retrieving revision 1.100
diff -u -p -r1.100 obj-coff.c
--- gas/config/obj-coff.c 2 Sep 2009 07:24:20 -0000 1.100
+++ gas/config/obj-coff.c 9 Sep 2009 13:04:26 -0000
@@ -1117,7 +1117,7 @@ weak_uniquify (const char * name)
char *ret;
const char * unique = "";
-#ifdef USE_UNIQUE
+#ifdef TE_PE
if (an_external_name != NULL)
unique = an_external_name;
#endif
Index: gas/config/obj-coff.h
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.h,v
retrieving revision 1.41
diff -u -p -r1.41 obj-coff.h
--- gas/config/obj-coff.h 2 Sep 2009 07:24:20 -0000 1.41
+++ gas/config/obj-coff.h 9 Sep 2009 13:04:26 -0000
@@ -162,9 +162,6 @@
#endif
#ifdef TE_PE
-/* PE weak symbols need USE_UNIQUE. */
-#define USE_UNIQUE 1
-
#define obj_set_weak_hook pecoff_obj_set_weak_hook
#define obj_clear_weak_hook pecoff_obj_clear_weak_hook
#endif
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-09 13:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-07 3:32 [patch 0/3] Fix some FAILS for: unordered .debug_info references to .debug_ranges Jan Kratochvil
2009-09-09 9:31 ` Alan Modra
2009-09-09 10:43 ` Jan Kratochvil
2009-09-09 13:19 ` Alan Modra
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).