summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--README6
-rw-r--r--TODO2
-rw-r--r--configure.ac22
-rw-r--r--lib/ChangeLog4
-rw-r--r--lib/eu-config.h6
-rw-r--r--libcpu/ChangeLog5
-rw-r--r--libcpu/Makefile.am4
-rw-r--r--libdw/ChangeLog5
-rw-r--r--libdw/Makefile.am8
-rw-r--r--po/ChangeLog6
-rw-r--r--po/Makevars2
-rw-r--r--po/POTFILES.in20
-rw-r--r--src/ChangeLog16
-rw-r--r--src/readelf.c56
-rw-r--r--src/size.c15
-rw-r--r--src/strip.c2
17 files changed, 144 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index e976f2db..d533c55b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@
* configure.ac: Add AC_PROG_CXX.
+2009-01-23 Roland McGrath <[email protected]>
+
+ * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
+
+ * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
+ building with compiler support but no working runtime support.
+
2009-01-22 Ulrich Drepper <[email protected]>
* Makefile.am (rpm): The tarball is now bzip2-compressed.
diff --git a/README b/README
index afc94077..33cac74f 100644
--- a/README
+++ b/README
@@ -4,3 +4,9 @@ Fundamental design decision:
This leaves byte ordering aside. While assuming this the code can be
greatly simplified and speed increases. Since no change violating this
assumption is in sight this is believed to be a worthwhile optimization.
+
+- the ABI of the backend modules is not guaranteed. Really, not guarantee
+ whatsoever. We are enforcing this in the code. The modules and their
+ users must match. No third-party EBL module are supported or allowed.
+ The only reason there are separate modules is to not have the code for
+ all architectures in all the binaries.
diff --git a/TODO b/TODO
index c884c2c1..de4aa0f1 100644
--- a/TODO
+++ b/TODO
@@ -1,7 +1,7 @@
ToDo list for elfutils -*-outline-*-
----------------------
-Time-stamp: <2009-01-16 20:55:06 drepper>
+Time-stamp: <2009-01-23 16:28:46 drepper>
* mkinstalldirs
diff --git a/configure.ac b/configure.ac
index ee753823..919e6355 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,12 +75,22 @@ CFLAGS="$old_CFLAGS"])
AS_IF([test "x$ac_cv_c99" != xyes],
AC_MSG_ERROR([gcc with C99 support required]))
-AC_CACHE_CHECK([for gcc with TLS support], ac_cv_tls, [dnl
-AC_COMPILE_IFELSE([dnl
-__thread int a; int foo (int b) { return a + b; }],
- ac_cv_tls=yes, ac_cv_tls=no)])
+AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
+# Use the same flags that we use for our DSOs, so the test is representative.
+# Some old compiler/linker/libc combinations fail some ways and not others.
+save_CFLAGS="$CFLAGS"
+save_LDFLAGS="$LDFLAGS"
+CFLAGS="-fpic $CFLAGS"
+LDFLAGS="-shared -Wl,-z,defs,-z,relro $LDFLAGS"
+AC_LINK_IFELSE([dnl
+AC_LANG_PROGRAM([[#undef __thread
+static __thread int a; int foo (int b) { return a + b; }]],
+ [[exit (foo (0));]])],
+ ac_cv_tls=yes, ac_cv_tls=no)
+CFLAGS="$save_CFLAGS"
+LDFLAGS="$save_LDFLAGS"])
AS_IF([test "x$ac_cv_tls" != xyes],
- AC_MSG_ERROR([gcc with TLS support required]))
+ AC_MSG_ERROR([__thread support required]))
LOCALEDIR=$datadir
AC_SUBST(LOCALEDIR)
@@ -194,7 +204,7 @@ dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am
dnl conditional and config.h USE_ZLIB/USE_BZLIB #define.
save_LIBS="$LIBS"
LIBS=
-eu_ZIPLIB(z,Z,z,gzdopen,gzip)
+eu_ZIPLIB(z,Z,z,gzdirect,gzip)
eu_ZIPLIB(bz,BZ,bz2,BZ2_bzdopen,bzip2)
zip_LIBS="$LIBS"
LIBS="$save_LIBS"
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 0774524c..06991826 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-23 Roland McGrath <[email protected]>
+
+ * eu-config.h: Add multiple inclusion protection.
+
2009-01-17 Ulrich Drepper <[email protected]>
* system.h (ARGP_PROGRAM_VERSION_HOOK_DEF): Define.
diff --git a/lib/eu-config.h b/lib/eu-config.h
index 03dba76a..32f501ae 100644
--- a/lib/eu-config.h
+++ b/lib/eu-config.h
@@ -46,6 +46,9 @@
Network licensing program, please visit www.openinventionnetwork.com
<http://www.openinventionnetwork.com>. */
+#ifndef EU_CONFIG_H
+#define EU_CONFIG_H 1
+
#ifdef USE_LOCKS
# include <pthread.h>
# include <assert.h>
@@ -178,3 +181,6 @@ asm (".section predict_data, \"aw\"; .previous\n"
/* This macro is used by the tests conditionalize for standalone building. */
#define ELFUTILS_HEADER(name) <lib##name.h>
+
+
+#endif /* eu-config.h */
diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
index a043e45f..12400f6b 100644
--- a/libcpu/ChangeLog
+++ b/libcpu/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-23 Roland McGrath <[email protected]>
+
+ * Makefile.am (i386_parse_CFLAGS): Use quotes around command
+ substitution that can produce leading whitespace.
+
2009-01-01 Ulrich Drepper <[email protected]>
* i386_parse.y (instrtable_out): Optimize match_data table by not
diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
index 51817c1e..e47dc0b0 100644
--- a/libcpu/Makefile.am
+++ b/libcpu/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to create Makefile.in
##
-## Copyright (C) 2002, 2004, 2005, 2007, 2008 Red Hat, Inc.
+## Copyright (C) 2002, 2004, 2005, 2007, 2008, 2009 Red Hat, Inc.
## This file is part of Red Hat elfutils.
##
## Red Hat elfutils is free software; you can redistribute it and/or modify
@@ -70,7 +70,7 @@ libeu = ../lib/libeu.a
i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare
i386_parse.o: i386_parse.c i386.mnemonics
-i386_parse_CFLAGS = -DNMNES=$$(wc -l < i386.mnemonics)
+i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`"
i386_lex.o: i386_parse.h
i386_gendis_LDADD = $(libeu) -lm $(libmudflap)
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index f9aff6c8..c9228637 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -3,6 +3,11 @@
* c++/dwarf: New file.
* Makefile.am (pkginclude_HEADERS): Add it.
+2009-01-23 Roland McGrath <[email protected]>
+
+ * Makefile.am ($(srcdir)/known-dwarf.h): Target renamed back.
+ Put these rules under if MAINTAINER_MODE.
+
2009-01-22 Roland McGrath <[email protected]>
* dwarf.h: Add DW_OP_GNU_encoded_addr.
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index 0542f3ad..965ac22e 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -86,11 +86,13 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \
libdw_visit_scopes.c \
dwarf_entry_breakpoints.c
-BUILT_SOURCES = known-dwarf.h
-CLEANFILES = known-dwarf.h
-known-dwarf.h: $(top_srcdir)/config/known-dwarf.awk $(srcdir)/dwarf.h
+if MAINTAINER_MODE
+BUILT_SOURCES = $(srcdir)/known-dwarf.h
+MAINTAINERCLEANFILES = $(srcdir)/known-dwarf.h
+$(srcdir)/known-dwarf.h: $(top_srcdir)/config/known-dwarf.awk $(srcdir)/dwarf.h
$(AWK) -f $^ > [email protected]
+endif
if !MUDFLAP
libdw_pic_a_SOURCES =
diff --git a/po/ChangeLog b/po/ChangeLog
index bbb72fad..1e103201 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-23 Ulrich Drepper <[email protected]>
+
+ * Makevars (XGETTEXT_OPTIONS): Add --flag option for argp_error.
+
+ * POTFILES.in: Add more files with translatable strings.
+
2007-06-05 Ulrich Drepper <[email protected]>
* Makefile.in.in: Update from gettext 0.16.1.
diff --git a/po/Makevars b/po/Makevars
index b8ea7022..80918502 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -9,7 +9,7 @@ top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --flag=error:3:c-format \
- --flag=ERROR:1:c-format
+ --flag=ERROR:1:c-format --flag=arg_error:2:c-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e3a192be..5ac4cdea 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,5 @@
# List of files which containing translatable strings.
-# Copyright (C) 2000, 2005 Red Hat, Inc.
+# Copyright (C) 2000, 2005, 2009 Red Hat, Inc.
# Files from the compatibility library
lib/xmalloc.c
@@ -10,14 +10,30 @@ lib/xstrndup.c
libelf/elf_error.c
libasm/asm_error.c
libdw/dwarf_error.c
+libdwfl/argp-std.c
+libebl/eblbackendname.c
+libebl/eblcorenotetypename.c
+libebl/ebldynamictagname.c
+libebl/eblobjecttypename.c
+libebl/eblobjnote.c
+libebl/eblobjnotetypename.c
+libebl/eblosabiname.c
+libebl/eblsectionname.c
+libebl/eblsectiontypename.c
+libebl/eblsegmenttypename.c
+libebl/eblsymbolbindingname.c
+libebl/eblsymboltypename.c
# Program sources
+src/ar.c
+src/arlib.c
src/nm.c
src/readelf.c
src/size.c
src/strip.c
src/ld.c
src/ldgeneric.c
+src/i386_ld.c
src/ldscript.y
src/elflint.c
src/addr2line.c
@@ -25,3 +41,5 @@ src/findtextrel.c
src/elfcmp.c
src/ranlib.c
src/strings.c
+src/unstrip.c
+src/objdump.c
diff --git a/src/ChangeLog b/src/ChangeLog
index 6e861506..35eb7964 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -117,6 +117,22 @@
* dwarflint.c: Checking for zero padding and unreferenced bytes.
CU size and padding at the end of CU are now checked.
+2009-01-24 Ulrich Drepper <[email protected]>
+
+ * readelf.c (print_debug_frame_section): Fix computation of vma_base
+ for PC-relative mode.
+
+2009-01-23 Ulrich Drepper <[email protected]>
+
+ * size.c (process_file): When handling archive, close file descriptor
+ here. For unknown file format also close file descriptor.
+ (handle_ar): Don't close file descriptor here.
+
+ * readelf.c (parse_opt): Move code to add to dump_data_sections and
+ string_sections list in local function add_dump_section. Adjust 'x'
+ key handling. For 'a' key add .strtab, .dynstr, and .comment section
+ to string_sections list.
+
2009-01-22 Roland McGrath <[email protected]>
* readelf.c (print_phdr): Don't print section mapping when no sections.
diff --git a/src/readelf.c b/src/readelf.c
index 884e799b..254cfcef 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -276,6 +276,17 @@ static error_t
parse_opt (int key, char *arg,
struct argp_state *state __attribute__ ((unused)))
{
+ void add_dump_section (const char *name)
+ {
+ struct section_argument *a = xmalloc (sizeof *a);
+ a->arg = name;
+ a->next = NULL;
+ struct section_argument ***tailp
+ = key == 'x' ? &dump_data_sections_tail : &string_sections_tail;
+ **tailp = a;
+ *tailp = &a->next;
+ }
+
switch (key)
{
case 'a':
@@ -291,6 +302,9 @@ parse_opt (int key, char *arg,
print_arch = true;
print_notes = true;
print_debug_sections |= section_exception;
+ add_dump_section (".strtab");
+ add_dump_section (".dynstr");
+ add_dump_section (".comment");
any_control_option = true;
break;
case 'A':
@@ -388,15 +402,7 @@ parse_opt (int key, char *arg,
}
/* Fall through. */
case 'x':
- {
- struct section_argument *a = xmalloc (sizeof *a);
- a->arg = arg;
- a->next = NULL;
- struct section_argument ***tailp
- = key == 'x' ? &dump_data_sections_tail : &string_sections_tail;
- **tailp = a;
- *tailp = &a->next;
- }
+ add_dump_section (arg);
any_control_option = true;
break;
case ARGP_KEY_NO_ARGS:
@@ -4054,6 +4060,7 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
unsigned int fde_encoding = 0;
unsigned int lsda_encoding = 0;
Dwarf_Word initial_location = 0;
+ Dwarf_Word vma_base = 0;
if (cie_id == (is_eh_frame ? 0 : DW_CIE_ID))
{
@@ -4220,16 +4227,26 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
cie->cie_offset, (uint64_t) cie_id,
(uint64_t) initial_location);
if ((fde_encoding & 0x70) == DW_EH_PE_pcrel)
- printf (gettext (" (offset: %#" PRIx64 ")"),
- ((uint64_t) shdr->sh_offset
- + (base - (const unsigned char *) data->d_buf)
- + (uint64_t) initial_location)
+ {
+ vma_base = (((uint64_t) shdr->sh_offset
+ + (base - (const unsigned char *) data->d_buf)
+ + (uint64_t) initial_location)
+ & (ptr_size == 4
+ ? UINT64_C (0xffffffff)
+ : UINT64_C (0xffffffffffffffff)));
+ printf (gettext (" (offset: %#" PRIx64 ")"),
+ (uint64_t) vma_base);
+ }
+
+ printf ("\n address_range: %#" PRIx64,
+ (uint64_t) address_range);
+ if ((fde_encoding & 0x70) == DW_EH_PE_pcrel)
+ printf (gettext (" (end offset: %#" PRIx64 ")"),
+ ((uint64_t) vma_base + (uint64_t) address_range)
& (ptr_size == 4
? UINT64_C (0xffffffff)
: UINT64_C (0xffffffffffffffff)));
-
- printf ("\n address_range: %#" PRIx64 "\n",
- (uint64_t) address_range);
+ putchar ('\n');
if (cie->augmentation[0] == 'z')
{
@@ -4270,13 +4287,6 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
}
}
- /* To print correct addresses compute the base address. */
- Dwarf_Word vma_base;
- if ((fde_encoding & 0x70) == DW_EH_PE_pcrel && ehdr->e_type != ET_REL)
- vma_base = shdr->sh_addr + initial_location;
- else
- vma_base = 0;
-
/* Handle the initialization instructions. */
print_cfa_program (readp, cieend, vma_base, code_alignment_factor,
data_alignment_factor, ptr_size, dwflmod, ebl, dbg);
diff --git a/src/size.c b/src/size.c
index f6f23d55..4698c350 100644
--- a/src/size.c
+++ b/src/size.c
@@ -319,13 +319,23 @@ process_file (const char *fname)
return 0;
}
else if (likely (elf_kind (elf) == ELF_K_AR))
- return handle_ar (fd, elf, NULL, fname);
+ {
+ int result = handle_ar (fd, elf, NULL, fname);
+
+ if (unlikely (close (fd) != 0))
+ error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
+
+ return result;
+ }
/* We cannot handle this type. Close the descriptor anyway. */
if (unlikely (elf_end (elf) != 0))
INTERNAL_ERROR (fname);
}
+ if (unlikely (close (fd) != 0))
+ error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
+
error (0, 0, gettext ("%s: file format not recognized"), fname);
return 1;
@@ -396,9 +406,6 @@ handle_ar (int fd, Elf *elf, const char *prefix, const char *fname)
if (unlikely (elf_end (elf) != 0))
INTERNAL_ERROR (fname);
- if (unlikely (close (fd) != 0))
- error (EXIT_FAILURE, errno, gettext ("while closing '%s'"), fname);
-
return result;
}
diff --git a/src/strip.c b/src/strip.c
index 1958bb51..27eb2106 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -437,7 +437,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
int debug_fd = -1;
/* Get the EBL handling. The -g option is currently the only reason
- we need EBL so dont open the backend unless necessary. */
+ we need EBL so don't open the backend unless necessary. */
Ebl *ebl = NULL;
if (remove_debug)
{