Strip on mips
by Kurt Roeckx
Hi,
I'm trying to debug why strip on mips isn't working properly.
What I see is that for the debug sections, sh_type is not set to
SHT_PROGBITS but to SHT_MIPS_DWARF.
The stripped file still ends up with the debug information it it,
and the file that is supposed to have the debug symbols in it
has it set to SHT_NOBITS, and is rather small.
I'm assuming this is because of the SHT_MIPS_DWARF. I'm not sure
how to find where it's going wrong.
Kurt
10 years, 11 months
FYI: readelf.c (print_ops): Add missing DW_OP_GNU operands.
by Mark Wielaard
Pushed the following commit as obvious.
commit 716486d5a15bdfb528c5d011dc623fa0f6fdc2af
Author: Mark Wielaard <mjw(a)redhat.com>
Date: Tue Apr 24 11:56:42 2012 +0200
readelf.c (print_ops): Add missing DW_OP_GNU operands.
DW_OP_GNU_push_tls_address, DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
diff --git a/src/ChangeLog b/src/ChangeLog
index 642df1b..cae5e6b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-24 Mark Wielaard <mjw(a)redhat.com>
+
+ * readelf.c (print_ops): Add DW_OP_GNU_push_tls_address,
+ DW_OP_GNU_uinit and DW_OP_GNU_encoded_addr.
+
2012-03-28 Roland McGrath <roland(a)hack.frob.com>
* elflint.c (special_sections): Accept SHF_INFO_LINK for reloc sections.
diff --git a/src/readelf.c b/src/readelf.c
index b70779d..b4e9fc8 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -4065,6 +4065,9 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
[DW_OP_bit_piece] = "bit_piece",
[DW_OP_implicit_value] = "implicit_value",
[DW_OP_stack_value] = "stack_value",
+ [DW_OP_GNU_push_tls_address] = "GNU_push_tls_address",
+ [DW_OP_GNU_uninit] = "GNU_uninit",
+ [DW_OP_GNU_encoded_addr] = "GNU_encoded_addr",
[DW_OP_GNU_implicit_pointer] = "GNU_implicit_pointer",
[DW_OP_GNU_entry_value] = "GNU_entry_value",
[DW_OP_GNU_const_type] = "GNU_const_type",
11 years, 2 months
Function symbol retention after stripping
by Douglas, William
Hi all,
I'm trying to get gbd backtraces to give function names without having
a package's debuginfo installed. Would elfutils take a patch allowing
strip to take an option for keeping the minimal amount of information
needed to do this?
I'm still trying to figure out how to do this exactly but right now I
think I would be keeping SHT_SYMTAB and SHT_DYNSYM function symbols
but I haven't looked at this code before and I'm still trying to
figure out how it all comes together. Any advice would be appreciated
if you'd be okay with this functionality in elfutils.
Thanks,
William
11 years, 3 months
FYI small test environment tweak
by Mark Wielaard
I pushed the following:
commit dbbc67a97ace66c3adc299f26261fdec99d0c0d6
Author: Mark Wielaard <mjw(a)redhat.com>
Date: Fri May 11 12:57:57 2012 +0200
TESTS_ENVIRONMENT set LC_ALL and LANG to C.
Some tests rely on sort order and output of tools that might be localized.
Reported-by: Paweł Sikora <pluto(a)pld-linux.org>
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 4c6e9f7..841742d 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-11 Mark Wielaard <mjw(a)redhat.com>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Set LC_ALL and LANG to C.
+
2012-05-07 Mark Wielaard <mjw(a)redhat.com>
* low_high_pc.c: Allow highpc == lowpc for CU DIEs for buggy GCC.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 61247e4..660791c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -169,13 +169,14 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
bindir=$(DESTDIR)$(bindir) \
+ LC_ALL=C LANG=C \
$(srcdir)/test-wrapper.sh \
installed $(tests_rpath) \
$(program_transform_name)
if STANDALONE
TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
else !STANDALONE
-TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
+TESTS_ENVIRONMENT = LC_ALL=C LANG=C $(srcdir)/test-wrapper.sh \
../libdw:../backends:../libelf:../libasm
installcheck-local:
11 years, 4 months
elflint: (zero sized section) alloc flag set but section not in any loaded segment
by Mark Wielaard
Hi,
Against development versions of gcc/binutils elflint gives some
complaints like:
section [24] '.tm_clone_table': alloc flag set but section not in any
loaded segment
This is because that section's size is zero. So it is somewhat
reasonable IMHO that the linker doesn't put it in any segment.
Is the following patch to elflint OK?
Thanks,
Mark
11 years, 4 months
FYI: tests/low_high_pc.c: Allow highpc == lowpc for CU DIEs for buggy GCC.
by Mark Wielaard
I pushed the following. Although the bug is fixed in GCC 4.7 that has
only been released last month. Most distros are still based on 4.6 or
lower.
commit d9bc75fc20f0ce5064cac192a518af3c7192e96d
Author: Mark Wielaard <mjw(a)redhat.com>
Date: Mon May 7 13:29:52 2012 +0200
tests/low_high_pc.c: Allow highpc == lowpc for CU DIEs for buggy GCC.
GCC < 4.7 had a bug where no code CUs got a highpc == lowpc.
Allow that, because it is not the main purpose of this test.
diff --git a/tests/ChangeLog b/tests/ChangeLog
index abc7340..4c6e9f7 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-07 Mark Wielaard <mjw(a)redhat.com>
+
+ * low_high_pc.c: Allow highpc == lowpc for CU DIEs for buggy GCC.
+
2012-04-27 Mark Wielaard <mjw(a)redhat.com>
* Makefile.am (TESTS): Add run-low_high_pc.sh
diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c
index 3054046..6fc8b15 100644
--- a/tests/low_high_pc.c
+++ b/tests/low_high_pc.c
@@ -72,9 +72,12 @@ handle_die (Dwarf_Die *die, void *arg)
if (dwarf_highpc (die, &highpc) != 0 && dwarf_hasattr (die, DW_AT_high_pc))
fail (off, name, "has DW_AT_high_pc but dwarf_highpc fails");
+ /* GCC < 4.7 had a bug where no code CUs got a highpc == lowpc.
+ Allow that, because it is not the main purpose of this test. */
if (dwarf_hasattr (die, DW_AT_low_pc)
&& dwarf_hasattr (die, DW_AT_high_pc)
- && highpc <= lowpc)
+ && highpc <= lowpc
+ && ! (dwarf_tag (die) == DW_TAG_compile_unit && highpc == lowpc))
{
printf("lowpc: %lx, highpc: %lx\n", lowpc, highpc);
fail (off, name, "highpc <= lowpc");
11 years, 4 months