]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
propagate from branch 'com.redhat.elfutils' (head b4944cf70801d9dac056f4f80ef1334e5ac...
authorRoland McGrath <roland@redhat.com>
Sun, 17 Dec 2006 23:56:51 +0000 (23:56 +0000)
committerRoland McGrath <roland@redhat.com>
Sun, 17 Dec 2006 23:56:51 +0000 (23:56 +0000)
            to branch 'com.redhat.elfutils.roland.pending' (head e7e402c668fb0670fc5f6b6a522853ae88f32f11)

15 files changed:
ChangeLog
Makefile.am
libdw/ChangeLog
libdw/dwarf_getlocation.c
libdwfl/ChangeLog
libdwfl/dwfl_module.c
libelf/ChangeLog
libelf/elf32_updatenull.c
libelf/elf_error.c
src/ChangeLog
src/Makefile.am
src/elflint.c
src/strip.c
tests/ChangeLog
tests/msg_tst.c

index a4eb6e4887fb4a195066425dc701b2a9b7f8a2da..760c4d2d873d5e70e224752273fc3140d1e26d9f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-11-02  Roland McGrath  <roland@redhat.com>
+
+       * Makefile.am (EXTRA_DIST): Add EXCEPTION file.
+
 2006-08-29  Roland McGrath  <roland@redhat.com>
 
        * configure.ac: Use AM_MAINTAINER_MODE.
index 8e8b1f756e7cacfde8234dccb4b4e6613e8d825e..9bfce658524964413a8e361fcbe39095945da959 100644 (file)
@@ -32,7 +32,7 @@ mini_SUBDIRS = config m4 lib libelf libelf-po
 all_SUBDIRS = libebl libdwfl libdw libcpu libasm backends src po tests
 SUBDIRS = $(mini_SUBDIRS) $(all_SUBDIRS)
 
-EXTRA_DIST = elfutils.spec GPG-KEY NOTES
+EXTRA_DIST = elfutils.spec GPG-KEY NOTES EXCEPTION
 
 # Make sure the test install uses lib64 when $LIB will yield lib64.
 # Make sure the test build uses the same compiler, which on e.g. ppc64
index 88a0c06dc50494f21b07826fac2db80dbbff6272..19c5d11b96d49cd5bfec19e37c82f72f29f959b7 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-17  Roland McGrath  <roland@redhat.com>
+
+       * dwarf_getlocation.c (dwarf_getlocation_addr): Use zero as base
+       address when the CU is missing attributes due to buggy GCC.
+
 2006-08-29  Roland McGrath  <roland@redhat.com>
 
        * Makefile.am (CLEANFILES): Add libdw.so.$(VERSION).
index f513f3aecdf3de5041610984ec89114987f14d98..cefd052b3cc2e0ef6ec6a5b1f8e1cf4883ac34ba 100644 (file)
@@ -1,5 +1,5 @@
 /* Return location expression list.
-   Copyright (C) 2000, 2001, 2002, 2004, 2005 Red Hat, Inc.
+   Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2000.
 
@@ -472,8 +472,12 @@ dwarf_getlocation_addr (attr, address, llbufs, listlens, maxlocs)
                                         &base) != 0)
            {
              if (INTUSE(dwarf_errno) () == 0)
-               goto invalid;
-             return -1;
+               /* The compiler provided no base address when it should
+                  have.  Buggy GCC does this when it used absolute
+                  addresses in the location list and no DW_AT_ranges.  */
+               base = 0;
+             else
+               return -1;
            }
        }
 
index 7dea9438208cfc8be4938cff6ed9af2e473ffd73..f70c3397f8aa30c2f988ef0a0768e91ca50e511c 100644 (file)
@@ -1,3 +1,7 @@
+2006-10-30  Roland McGrath  <roland@redhat.com>
+
+       * dwfl_module.c (dwfl_report_module): Comment typo fix.
+
 2006-09-05  Roland McGrath  <roland@redhat.com>
 
        * derelocate.c (cache_sections): Use alloca instead of variable-sized
index 3ccf8b1616ebb56640e194985cf13d1d8c8c84a2..5990b7550c4f602a39e88307729b12543d82b968 100644 (file)
@@ -109,7 +109,7 @@ dwfl_report_begin (Dwfl *dwfl)
 }
 INTDEF (dwfl_report_begin)
 
-/* Report that a module called NAME pans addresses [START, END).
+/* Report that a module called NAME spans addresses [START, END).
    Returns the module handle, either existing or newly allocated,
    or returns a null pointer for an allocation error.  */
 Dwfl_Module *
index 81c6057ce897a6ea6f74fdb1461c73582870fabc..9ff24df2d056a34672fade54a6f10a2b10d7c79f 100644 (file)
@@ -1,3 +1,10 @@
+2006-10-13  Roland McGrath  <roland@redhat.com>
+
+       * elf32_updatenull.c: Look for phdr if e_phnum nonzero, regardless of
+       e_type.  Diagnose ELF_E_INVALID_PHDR only for ET_REL, and not
+       if ELF_F_PERMISSIVE.
+       * elf_error.c (msgstr): Change ELF_E_INVALID_PHDR string.
+
 2006-08-29  Roland McGrath  <roland@redhat.com>
 
        * elf32_getphdr.c: Don't byteswap phdr fields when EI_DATA matches
index 3b926c1f27bdb6eda4154290ceb1c72b9e6d5257..0de48beaf3942e05572b5a772f41e7170bc44035 100644 (file)
@@ -147,13 +147,13 @@ __elfw2(LIBELFBITS,updatenull) (Elf *elf, int *change_bop, size_t shnum)
   off_t size = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1);
 
   /* Set the program header position.  */
-  if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL
-      && (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN))
+  if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL && ehdr->e_phnum != 0)
     (void) INTUSE(elfw2(LIBELFBITS,getphdr)) (elf);
   if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL)
     {
       /* Only executables or shared objects have a program header.  */
-      if (ehdr->e_type != ET_EXEC && unlikely (ehdr->e_type != ET_DYN))
+      if (unlikely (ehdr->e_type == ET_REL)
+         && (elf->flags & ELF_F_PERMISSIVE) == 0)
        {
          __libelf_seterrno (ELF_E_INVALID_PHDR);
          return -1;
index eb277e7202ddfc852e0397ad7740778fe705b365..3161b8b8bb4aacb573e5d0143488dde22ce6e432 100644 (file)
@@ -1,5 +1,5 @@
 /* Error handling in libelf.
-   Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005 Red Hat, Inc.
+   Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 1998.
 
@@ -270,11 +270,11 @@ static const char msgstr[] =
 #define ELF_E_INVALID_PHDR_IDX \
   (ELF_E_GROUP_NOT_REL_IDX \
    + sizeof "only relocatable files can contain section groups")
-  N_("program header only allowed in executables and shared objects")
+  N_("program header not allowed in relocatable files")
   "\0"
 #define ELF_E_NO_PHDR_IDX \
   (ELF_E_INVALID_PHDR_IDX \
-   + sizeof "program header only allowed in executables and shared objects")
+   + sizeof "program header not allowed in relocatable files")
   N_("file has no program header")
   "\0"
 #define ELF_E_INVALID_OFFSET_IDX \
index e89f6c0b3e1578c8ead308365b698ba98cf88ef8..190c673266de18dd69aa6ea5cf42f6cebba86eeb 100644 (file)
@@ -4,6 +4,19 @@
        two hash tables have different content (module expected omission
        of undefined symbols).
 
+2006-10-31  Roland McGrath  <roland@redhat.com>
+
+       * elflint.c (check_program_header): Don't complain about
+       p_filesz > p_memsz if p_memsz is zero and p_type is not PT_LOAD.
+
+2006-09-19  Jakub Jelinek  <jakub@redhat.com>
+
+       * strip.c (process_file): Disallow -f on archives.
+
+2006-10-09  Roland McGrath  <roland@redhat.com>
+
+       * Makefile.am (libld_elf_i386.so): Use $(LINK), not $(CC).
+
 2006-08-29  Roland McGrath  <roland@redhat.com>
 
        * Makefile.am (MAINTAINERCLEANFILES): New variable.
index 470a6b3aa65fd4d0ed8b63ada1459fed92230c08..7c9eb8427dafbf832c22ce8d78ce36bc0f1dca4e 100644 (file)
@@ -133,9 +133,9 @@ am_libld_elf_i386_pic_a_OBJECTS = i386_ld.os
 
 libld_elf_i386_so_SOURCES =
 libld_elf_i386.so: libld_elf_i386_pic.a libld_elf_i386.map
-       $(CC) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
-             $(libelf) $(libeu) \
-             -Wl,--version-script,$(srcdir)/libld_elf_i386.map
+       $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \
+               $(libelf) $(libeu) \
+               -Wl,--version-script,$(srcdir)/libld_elf_i386.map
        $(textrel_check)
 endif
 
index e59173926eb06fd067949789aa5d455040b2f870..06930ca8f5de23c249aac820f85352998a370d9a 100644 (file)
@@ -3829,7 +3829,8 @@ loadable segment GNU_RELRO applies to is executable\n"));
 program header offset in ELF header and PHDR entry do not match"));
        }
 
-      if (phdr->p_filesz > phdr->p_memsz)
+      if (phdr->p_filesz > phdr->p_memsz
+         && (phdr->p_memsz != 0 || phdr->p_type == PT_LOAD))
        ERROR (gettext ("\
 program header entry %d: file size greater than memory size\n"),
               cnt);
index fc6ddf50ef45dba665d1cbfc8a21a0221b028957..4c6b7bfbb60e020faf0c18839e35565488ca7a05 100644 (file)
@@ -344,9 +344,9 @@ process_file (const char *fname)
     case ELF_K_AR:
       /* It is not possible to strip the content of an archive direct
         the output to a specific file.  */
-      if (unlikely (output_fname != NULL))
+      if (unlikely (output_fname != NULL || debug_fname != NULL))
        {
-         error (0, 0, gettext ("%s: cannot use -o when stripping archive"),
+         error (0, 0, gettext ("%s: cannot use -o or -f when stripping archive"),
                 fname);
          result = 1;
        }
index 44b0bb4ae869305b27813ba01c88343aae89baf1..372ff7ebb83fe6c6465970e89c6f768bb39d4395 100644 (file)
@@ -1,3 +1,7 @@
+2006-12-17  Roland McGrath  <roland@redhat.com>
+
+       * msg_tst.c (libelf_msgs): Fix ELF_E_INVALID_PHDR msg.
+
 2006-09-05  Roland McGrath  <roland@redhat.com>
 
        * run-strings-test.sh: Export LC_ALL=C for the test.
index a432b6c455ee74bd4ead30fecc5130e834a0e57c..36debbe4a12a9d9942e52c7dbc4e57b206fa874e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2005 Red Hat, Inc.
+/* Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -79,7 +79,7 @@ static struct
     { ELF_E_GROUP_NOT_REL,
       "only relocatable files can contain section groups" },
     { ELF_E_INVALID_PHDR,
-      "program header only allowed in executables and shared objects" },
+      "program header not allowed in relocatable files" },
     { ELF_E_NO_PHDR, "file has no program header" },
     { ELF_E_INVALID_OFFSET, "invalid offset" }
   };