SHA256
3
0
forked from pool/elfutils

Accepting request 215570 from Base:System

(forwarded request 215569 from jones_tony)

OBS-URL: https://build.opensuse.org/request/show/215570
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/elfutils?expand=0&rev=41
This commit is contained in:
Stephan Kulow 2014-01-30 18:16:19 +00:00 committed by Git OBS Bridge
commit 939ec08cfa
11 changed files with 624 additions and 377 deletions

View File

@ -14,11 +14,9 @@ semantic error: libdw failure (dwarf_getsrcfiles): invalid DWARF
libdw/dwarf_getsrclines.c | 2 ++
1 file changed, 2 insertions(+)
Index: elfutils-0.155/libdw/dwarf_getsrclines.c
===================================================================
--- elfutils-0.155.orig/libdw/dwarf_getsrclines.c
+++ elfutils-0.155/libdw/dwarf_getsrclines.c
@@ -296,8 +296,10 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwa
--- a/libdw/dwarf_getsrclines.c
+++ b/libdw/dwarf_getsrclines.c
@@ -306,8 +306,10 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwa
/* Consistency check. */
if (unlikely (linep != header_start + header_length))
{

View File

@ -2,10 +2,12 @@ From: Stephan Kulow <coolo@novell.com>
Avoid crash if the header is 0
Index: elfutils-0.155/libdw/dwarf_getcfi_elf.c
===================================================================
--- elfutils-0.155.orig/libdw/dwarf_getcfi_elf.c
+++ elfutils-0.155/libdw/dwarf_getcfi_elf.c
---
libdw/dwarf_getcfi_elf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/libdw/dwarf_getcfi_elf.c
+++ b/libdw/dwarf_getcfi_elf.c
@@ -76,7 +76,7 @@ parse_eh_frame_hdr (const uint8_t *hdr,
{
const uint8_t *h = hdr;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4fadc9c0c19d02fb6d2bdfee65f20ddbecba398d3f714e2b6c42ffc4615cce85
size 2624207

3
elfutils-0.158.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be27af5c21352f53e010342bf1c68e0b9e18232dbf3adec7e2f9b41f6bbe397d
size 4931570

View File

@ -2,10 +2,13 @@ From: unknown
Upstream: no
Subject: do not build po and tests components
Index: elfutils-0.155/Makefile.am
===================================================================
--- elfutils-0.155.orig/Makefile.am
+++ elfutils-0.155/Makefile.am
---
Makefile.am | 2 +-
Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,7 +24,7 @@ pkginclude_HEADERS = version.h
# Add doc back when we have some real content.
@ -15,11 +18,9 @@ Index: elfutils-0.155/Makefile.am
EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
COPYING COPYING-GPLV2 COPYING-LGPLV3
Index: elfutils-0.155/Makefile.in
===================================================================
--- elfutils-0.155.orig/Makefile.in
+++ elfutils-0.155/Makefile.in
@@ -259,7 +259,7 @@ pkginclude_HEADERS = version.h
--- a/Makefile.in
+++ b/Makefile.in
@@ -360,7 +360,7 @@ pkginclude_HEADERS = version.h
# Add doc back when we have some real content.
SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,51 @@
--- elfutils/libdwfl/ChangeLog
+++ elfutils/libdwfl/ChangeLog
@@ -256,6 +256,11 @@
From: unknown
Subject: elfutils robustness
Upstream: no
References: https://fedorahosted.org/releases/e/l/elfutils/0.158/elfutils-robustify.patch
Signed-off-by: Tony Jones <tonyj@suse.de>
Various robustness fixes not deemed acceptable for inclusion into git repo.
---
libdwfl/ChangeLog | 5 +
libdwfl/relocate.c | 9 ++-
libelf/ChangeLog | 43 +++++++++++++++
libelf/elf32_getphdr.c | 10 +++
libelf/elf32_getshdr.c | 13 ++++
libelf/elf32_newphdr.c | 6 ++
libelf/elf32_updatefile.c | 7 ++
libelf/elf_begin.c | 30 ++++++++++
libelf/elf_getarsym.c | 3 +
libelf/elf_getshdrstrndx.c | 42 ++++++++++++---
libelf/elf_newscn.c | 10 +++
libelf/gelf_getdyn.c | 6 +-
libelf/gelf_getlib.c | 4 -
libelf/gelf_getmove.c | 4 -
libelf/gelf_getrel.c | 12 +---
libelf/gelf_getrela.c | 12 +---
libelf/gelf_getsym.c | 6 +-
libelf/gelf_getsyminfo.c | 4 -
libelf/gelf_getsymshndx.c | 8 +-
libelf/gelf_getversym.c | 4 -
libelf/gelf_update_dyn.c | 12 +---
libelf/gelf_update_lib.c | 10 ---
libelf/gelf_update_move.c | 5 -
libelf/gelf_update_rel.c | 12 +---
libelf/gelf_update_rela.c | 12 +---
libelf/gelf_update_sym.c | 12 +---
libelf/gelf_update_syminfo.c | 10 ---
libelf/gelf_update_symshndx.c | 12 +---
libelf/gelf_update_versym.c | 5 -
libelf/libelfP.h | 4 +
src/ChangeLog | 29 ++++++++++
src/elflint.c | 103 +++++++++++++++++++++++++++---------
src/readelf.c | 117 +++++++++++++++++++++++++++++-------------
src/strip.c | 80 +++++++++++++++++++---------
34 files changed, 456 insertions(+), 205 deletions(-)
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -695,6 +695,11 @@
* dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
Reported by Kurt Roeckx <kurt@roeckx.be>.
@ -12,8 +57,8 @@
2011-02-11 Roland McGrath <roland@redhat.com>
* linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
--- elfutils/libdwfl/relocate.c
+++ elfutils/libdwfl/relocate.c
--- a/libdwfl/relocate.c
+++ b/libdwfl/relocate.c
@@ -1,5 +1,5 @@
/* Relocate debug information.
- Copyright (C) 2005-2010 Red Hat, Inc.
@ -42,9 +87,9 @@
gelf_update_shdr (scn, shdr);
}
--- elfutils/libelf/ChangeLog
+++ elfutils/libelf/ChangeLog
@@ -715,10 +715,53 @@
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -759,10 +759,53 @@
If section content hasn't been read yet, do it before looking for the
block size. If no section data present, infer size of section header.
@ -98,8 +143,8 @@
2005-05-09 Ulrich Drepper <drepper@redhat.com>
* elf.h: Update from glibc.
--- elfutils/libelf/elf32_getphdr.c
+++ elfutils/libelf/elf32_getphdr.c
--- a/libelf/elf32_getphdr.c
+++ b/libelf/elf32_getphdr.c
@@ -93,6 +93,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf)
if (elf->map_address != NULL)
@ -117,8 +162,8 @@
/* All the data is already mapped. Use it. */
void *file_phdr = ((char *) elf->map_address
+ elf->start_offset + ehdr->e_phoff);
--- elfutils/libelf/elf32_getshdr.c
+++ elfutils/libelf/elf32_getshdr.c
--- a/libelf/elf32_getshdr.c
+++ b/libelf/elf32_getshdr.c
@@ -60,7 +60,8 @@ load_shdr_wrlock (Elf_Scn *scn)
goto out;
@ -146,8 +191,8 @@
ElfW2(LIBELFBITS,Shdr) *notcvt;
/* All the data is already mapped. If we could use it
--- elfutils/libelf/elf32_newphdr.c
+++ elfutils/libelf/elf32_newphdr.c
--- a/libelf/elf32_newphdr.c
+++ b/libelf/elf32_newphdr.c
@@ -114,6 +114,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count)
|| count == PN_XNUM
|| elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
@ -161,8 +206,8 @@
/* Allocate a new program header with the appropriate number of
elements. */
result = (ElfW2(LIBELFBITS,Phdr) *)
--- elfutils/libelf/elf32_updatefile.c
+++ elfutils/libelf/elf32_updatefile.c
--- a/libelf/elf32_updatefile.c
+++ b/libelf/elf32_updatefile.c
@@ -202,6 +202,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf
/* Write all the sections. Well, only those which are modified. */
if (shnum > 0)
@ -184,8 +229,8 @@
off_t shdr_offset = elf->start_offset + ehdr->e_shoff;
#if EV_NUM != 2
xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR];
--- elfutils/libelf/elf_begin.c
+++ elfutils/libelf/elf_begin.c
--- a/libelf/elf_begin.c
+++ b/libelf/elf_begin.c
@@ -144,7 +144,8 @@ get_shnum (void *map_address, unsigned c
if (unlikely (result == 0) && ehdr.e32->e_shoff != 0)
@ -251,8 +296,8 @@
elf->state.elf64.shdr
= (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff);
--- elfutils/libelf/elf_getarsym.c
+++ elfutils/libelf/elf_getarsym.c
--- a/libelf/elf_getarsym.c
+++ b/libelf/elf_getarsym.c
@@ -183,6 +183,9 @@ elf_getarsym (elf, ptr)
size_t index_size = atol (tmpbuf);
@ -263,8 +308,8 @@
|| n * w > index_size)
{
/* This index table cannot be right since it does not fit into
--- elfutils/libelf/elf_getshdrstrndx.c
+++ elfutils/libelf/elf_getshdrstrndx.c
--- a/libelf/elf_getshdrstrndx.c
+++ b/libelf/elf_getshdrstrndx.c
@@ -104,10 +104,25 @@ elf_getshdrstrndx (elf, dst)
if (elf->map_address != NULL
&& elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA
@ -323,8 +368,8 @@
else
{
/* We avoid reading in all the section headers. Just read
--- elfutils/libelf/elf_newscn.c
+++ elfutils/libelf/elf_newscn.c
--- a/libelf/elf_newscn.c
+++ b/libelf/elf_newscn.c
@@ -83,10 +83,18 @@ elf_newscn (elf)
else
{
@ -345,8 +390,8 @@
newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList)
+ ((elf->state.elf.scnincr *= 2)
* sizeof (Elf_Scn)), 1);
--- elfutils/libelf/gelf_getdyn.c
+++ elfutils/libelf/gelf_getdyn.c
--- a/libelf/gelf_getdyn.c
+++ b/libelf/gelf_getdyn.c
@@ -1,5 +1,5 @@
/* Get information from dynamic table at the given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -372,8 +417,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_getlib.c
+++ elfutils/libelf/gelf_getlib.c
--- a/libelf/gelf_getlib.c
+++ b/libelf/gelf_getlib.c
@@ -1,5 +1,5 @@
/* Get library from table at the given index.
- Copyright (C) 2004 Red Hat, Inc.
@ -390,8 +435,8 @@
__libelf_seterrno (ELF_E_INVALID_INDEX);
else
{
--- elfutils/libelf/gelf_getmove.c
+++ elfutils/libelf/gelf_getmove.c
--- a/libelf/gelf_getmove.c
+++ b/libelf/gelf_getmove.c
@@ -1,5 +1,5 @@
/* Get move structure at the given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -408,8 +453,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_getrela.c
+++ elfutils/libelf/gelf_getrela.c
--- a/libelf/gelf_getrela.c
+++ b/libelf/gelf_getrela.c
@@ -1,5 +1,5 @@
/* Get RELA relocation information at given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -448,8 +493,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
result = NULL;
--- elfutils/libelf/gelf_getrel.c
+++ elfutils/libelf/gelf_getrel.c
--- a/libelf/gelf_getrel.c
+++ b/libelf/gelf_getrel.c
@@ -1,5 +1,5 @@
/* Get REL relocation information at given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -488,8 +533,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
result = NULL;
--- elfutils/libelf/gelf_getsym.c
+++ elfutils/libelf/gelf_getsym.c
--- a/libelf/gelf_getsym.c
+++ b/libelf/gelf_getsym.c
@@ -1,5 +1,5 @@
/* Get symbol information from symbol table at the given index.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
@ -515,8 +560,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_getsyminfo.c
+++ elfutils/libelf/gelf_getsyminfo.c
--- a/libelf/gelf_getsyminfo.c
+++ b/libelf/gelf_getsyminfo.c
@@ -1,5 +1,5 @@
/* Get additional symbol information from symbol table at the given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -533,8 +578,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_getsymshndx.c
+++ elfutils/libelf/gelf_getsymshndx.c
--- a/libelf/gelf_getsymshndx.c
+++ b/libelf/gelf_getsymshndx.c
@@ -1,6 +1,6 @@
/* Get symbol information and separate section index from symbol table
at the given index.
@ -570,8 +615,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_getversym.c
+++ elfutils/libelf/gelf_getversym.c
--- a/libelf/gelf_getversym.c
+++ b/libelf/gelf_getversym.c
@@ -1,5 +1,5 @@
/* Get symbol version information at the given index.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
@ -588,8 +633,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
result = NULL;
--- elfutils/libelf/gelf_update_dyn.c
+++ elfutils/libelf/gelf_update_dyn.c
--- a/libelf/gelf_update_dyn.c
+++ b/libelf/gelf_update_dyn.c
@@ -1,5 +1,5 @@
/* Update information in dynamic table at the given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -628,8 +673,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_update_lib.c
+++ elfutils/libelf/gelf_update_lib.c
--- a/libelf/gelf_update_lib.c
+++ b/libelf/gelf_update_lib.c
@@ -1,5 +1,5 @@
/* Update library in table at the given index.
- Copyright (C) 2004 Red Hat, Inc.
@ -659,8 +704,8 @@
__libelf_seterrno (ELF_E_INVALID_INDEX);
else
{
--- elfutils/libelf/gelf_update_move.c
+++ elfutils/libelf/gelf_update_move.c
--- a/libelf/gelf_update_move.c
+++ b/libelf/gelf_update_move.c
@@ -1,5 +1,5 @@
/* Update move structure at the given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -678,8 +723,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
return 0;
--- elfutils/libelf/gelf_update_rela.c
+++ elfutils/libelf/gelf_update_rela.c
--- a/libelf/gelf_update_rela.c
+++ b/libelf/gelf_update_rela.c
@@ -1,5 +1,5 @@
/* Update RELA relocation information at given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -718,8 +763,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_update_rel.c
+++ elfutils/libelf/gelf_update_rel.c
--- a/libelf/gelf_update_rel.c
+++ b/libelf/gelf_update_rel.c
@@ -1,5 +1,5 @@
/* Update REL relocation information at given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -758,8 +803,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_update_sym.c
+++ elfutils/libelf/gelf_update_sym.c
--- a/libelf/gelf_update_sym.c
+++ b/libelf/gelf_update_sym.c
@@ -1,5 +1,5 @@
/* Update symbol information in symbol table at the given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -798,8 +843,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_update_syminfo.c
+++ elfutils/libelf/gelf_update_syminfo.c
--- a/libelf/gelf_update_syminfo.c
+++ b/libelf/gelf_update_syminfo.c
@@ -1,5 +1,5 @@
/* Update additional symbol information in symbol table at the given index.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
@ -829,8 +874,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_update_symshndx.c
+++ elfutils/libelf/gelf_update_symshndx.c
--- a/libelf/gelf_update_symshndx.c
+++ b/libelf/gelf_update_symshndx.c
@@ -1,6 +1,6 @@
/* Update symbol information and section index in symbol table at the
given index.
@ -870,8 +915,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
goto out;
--- elfutils/libelf/gelf_update_versym.c
+++ elfutils/libelf/gelf_update_versym.c
--- a/libelf/gelf_update_versym.c
+++ b/libelf/gelf_update_versym.c
@@ -1,5 +1,5 @@
/* Update symbol version information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
@ -889,8 +934,8 @@
{
__libelf_seterrno (ELF_E_INVALID_INDEX);
return 0;
--- elfutils/libelf/libelfP.h
+++ elfutils/libelf/libelfP.h
--- a/libelf/libelfP.h
+++ b/libelf/libelfP.h
@@ -587,4 +587,8 @@ extern uint32_t __libelf_crc32 (uint32_t
/* Align offset to 4 bytes as needed for note name and descriptor data. */
#define NOTE_ALIGN(n) (((n) + 3) & -4U)
@ -900,9 +945,9 @@
+ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx))
+
#endif /* libelfP.h */
--- elfutils/src/ChangeLog
+++ elfutils/src/ChangeLog
@@ -504,6 +504,12 @@
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -702,6 +702,12 @@
* readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature.
@ -915,7 +960,7 @@
2011-02-11 Roland McGrath <roland@redhat.com>
* elfcmp.c (verbose): New variable.
@@ -2216,6 +2222,16 @@
@@ -2439,6 +2445,16 @@
object symbols or symbols with unknown type.
(check_rel): Likewise.
@ -932,7 +977,7 @@
2005-06-08 Roland McGrath <roland@redhat.com>
* readelf.c (print_ops): Add consts.
@@ -2261,6 +2277,19 @@
@@ -2489,6 +2505,19 @@
* readelf.c (dwarf_tag_string): Add new tags.
@ -952,8 +997,8 @@
2005-05-08 Roland McGrath <roland@redhat.com>
* strip.c (handle_elf): Don't translate hash and versym data formats,
--- elfutils/src/elflint.c
+++ elfutils/src/elflint.c
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -123,6 +123,10 @@ static uint32_t shstrndx;
/* Array to count references in section groups. */
static int *scnref;
@ -1227,9 +1272,9 @@
ERROR (gettext ("\
section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"),
idx, section_name (ebl, idx),
--- elfutils/src/readelf.c
+++ elfutils/src/readelf.c
@@ -1363,6 +1363,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -1364,6 +1364,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
Elf32_Word *grpref = (Elf32_Word *) data->d_buf;
GElf_Sym sym_mem;
@ -1238,7 +1283,7 @@
printf ((grpref[0] & GRP_COMDAT)
? ngettext ("\
\nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n",
@@ -1375,8 +1377,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
@@ -1376,8 +1378,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G
data->d_size / sizeof (Elf32_Word) - 1),
elf_ndxscn (scn),
elf_strptr (ebl->elf, shstrndx, shdr->sh_name),
@ -1249,7 +1294,7 @@
?: gettext ("<INVALID SYMBOL>"),
data->d_size / sizeof (Elf32_Word) - 1);
@@ -1527,10 +1529,12 @@ static void
@@ -1528,10 +1530,12 @@ static void
handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr)
{
int class = gelf_getclass (ebl->elf);
@ -1263,7 +1308,7 @@
/* Get the data of the section. */
data = elf_getdata (scn, NULL);
@@ -1542,21 +1546,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
@@ -1543,21 +1547,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn,
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
@ -1296,7 +1341,7 @@
{
GElf_Dyn dynmem;
GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem);
@@ -1705,7 +1714,8 @@ static void
@@ -1706,7 +1715,8 @@ static void
handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
{
int class = gelf_getclass (ebl->elf);
@ -1306,7 +1351,7 @@
/* Get the data of the section. */
Elf_Data *data = elf_getdata (scn, NULL);
@@ -1891,7 +1901,8 @@ static void
@@ -1892,7 +1902,8 @@ static void
handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr)
{
int class = gelf_getclass (ebl->elf);
@ -1316,7 +1361,7 @@
/* Get the data of the section. */
Elf_Data *data = elf_getdata (scn, NULL);
@@ -2138,6 +2149,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
@@ -2139,6 +2150,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
@ -1330,7 +1375,7 @@
/* Now we can compute the number of entries in the section. */
unsigned int nsyms = data->d_size / (class == ELFCLASS32
? sizeof (Elf32_Sym)
@@ -2148,15 +2166,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
@@ -2149,15 +2167,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G
nsyms),
(unsigned int) elf_ndxscn (scn),
elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms);
@ -1347,7 +1392,7 @@
fputs_unlocked (class == ELFCLASS32
? gettext ("\
@@ -2392,7 +2407,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
@@ -2393,7 +2408,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
@ -1362,7 +1407,7 @@
printf (ngettext ("\
\nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\
@@ -2403,9 +2424,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
@@ -2404,9 +2425,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn,
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset,
(unsigned int) shdr->sh_link,
@ -1373,7 +1418,7 @@
unsigned int offset = 0;
for (int cnt = shdr->sh_info; --cnt >= 0; )
@@ -2458,8 +2477,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
@@ -2459,8 +2478,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
@ -1389,7 +1434,7 @@
printf (ngettext ("\
\nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\
@@ -2471,9 +2496,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
@@ -2472,9 +2497,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G
class == ELFCLASS32 ? 10 : 18, shdr->sh_addr,
shdr->sh_offset,
(unsigned int) shdr->sh_link,
@ -1400,7 +1445,7 @@
unsigned int offset = 0;
for (int cnt = shdr->sh_info; --cnt >= 0; )
@@ -2735,25 +2758,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
@@ -2736,25 +2759,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G
filename = NULL;
}
@ -1438,7 +1483,7 @@
{
if (cnt % 2 == 0)
printf ("\n %4d:", cnt);
@@ -2802,7 +2830,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
@@ -2803,7 +2831,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt)
++counts[lengths[cnt]];
@ -1457,7 +1502,7 @@
printf (ngettext ("\
\nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n",
"\
@@ -2815,9 +2853,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
@@ -2816,9 +2854,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn,
shdr->sh_addr,
shdr->sh_offset,
(unsigned int) shdr->sh_link,
@ -1468,7 +1513,7 @@
if (extrastr != NULL)
fputs (extrastr, stdout);
@@ -3077,7 +3113,8 @@ print_liblist (Ebl *ebl)
@@ -3078,7 +3114,8 @@ print_liblist (Ebl *ebl)
if (shdr != NULL && shdr->sh_type == SHT_GNU_LIBLIST)
{
@ -1478,7 +1523,7 @@
printf (ngettext ("\
\nLibrary list section [%2zu] '%s' at offset %#0" PRIx64 " contains %d entry:\n",
"\
@@ -4397,6 +4434,16 @@ print_decoded_aranges_section (Ebl *ebl,
@@ -4403,6 +4440,16 @@ print_decoded_aranges_section (Ebl *ebl,
return;
}
@ -1495,9 +1540,9 @@
printf (ngettext ("\
\nDWARF section [%2zu] '%s' at offset %#" PRIx64 " contains %zu entry:\n",
"\
--- elfutils/src/strip.c
+++ elfutils/src/strip.c
@@ -565,6 +565,11 @@ handle_elf (int fd, Elf *elf, const char
--- a/src/strip.c
+++ b/src/strip.c
@@ -581,6 +581,11 @@ handle_elf (int fd, Elf *elf, const char
goto fail_close;
}
@ -1509,7 +1554,7 @@
/* Storage for section information. We leave room for two more
entries since we unconditionally create a section header string
table. Maybe some weird tool created an ELF file without one.
@@ -586,7 +591,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -602,7 +607,7 @@ handle_elf (int fd, Elf *elf, const char
{
/* This should always be true (i.e., there should not be any
holes in the numbering). */
@ -1518,7 +1563,7 @@
shdr_info[cnt].scn = scn;
@@ -599,6 +604,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -615,6 +620,7 @@ handle_elf (int fd, Elf *elf, const char
shdr_info[cnt].shdr.sh_name);
if (shdr_info[cnt].name == NULL)
{
@ -1526,7 +1571,7 @@
error (0, 0, gettext ("illformed file '%s'"), fname);
goto fail_close;
}
@@ -608,6 +614,8 @@ handle_elf (int fd, Elf *elf, const char
@@ -624,6 +630,8 @@ handle_elf (int fd, Elf *elf, const char
/* Remember the shdr.sh_link value. */
shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link;
@ -1535,7 +1580,7 @@
/* Sections in files other than relocatable object files which
are not loaded can be freely moved by us. In relocatable
@@ -620,7 +628,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -636,7 +644,7 @@ handle_elf (int fd, Elf *elf, const char
appropriate reference. */
if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX))
{
@ -1544,7 +1589,7 @@
shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt;
}
else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP))
@@ -637,7 +645,12 @@ handle_elf (int fd, Elf *elf, const char
@@ -653,7 +661,12 @@ handle_elf (int fd, Elf *elf, const char
for (inner = 1;
inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word);
++inner)
@ -1557,7 +1602,7 @@
if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0))
/* If the section group contains only one element and this
@@ -648,7 +661,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -664,7 +677,7 @@ handle_elf (int fd, Elf *elf, const char
}
else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym))
{
@ -1566,7 +1611,7 @@
shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt;
}
@@ -656,7 +669,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -672,7 +685,7 @@ handle_elf (int fd, Elf *elf, const char
discarded right away. */
if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0)
{
@ -1575,7 +1620,7 @@
if (shdr_info[shdr_info[cnt].group_idx].idx == 0)
{
@@ -732,10 +745,14 @@ handle_elf (int fd, Elf *elf, const char
@@ -748,10 +761,14 @@ handle_elf (int fd, Elf *elf, const char
{
/* If a relocation section is marked as being removed make
sure the section it is relocating is removed, too. */
@ -1593,7 +1638,7 @@
/* If a group section is marked as being removed make
sure all the sections it contains are being removed, too. */
@@ -779,7 +796,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -795,7 +812,7 @@ handle_elf (int fd, Elf *elf, const char
if (shdr_info[cnt].symtab_idx != 0
&& shdr_info[shdr_info[cnt].symtab_idx].data == NULL)
{
@ -1602,7 +1647,7 @@
shdr_info[shdr_info[cnt].symtab_idx].data
= elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
@@ -819,6 +836,9 @@ handle_elf (int fd, Elf *elf, const char
@@ -835,6 +852,9 @@ handle_elf (int fd, Elf *elf, const char
else if (scnidx == SHN_XINDEX)
scnidx = xndx;
@ -1612,7 +1657,7 @@
if (shdr_info[scnidx].idx == 0)
/* This symbol table has a real symbol in
a discarded section. So preserve the
@@ -849,12 +869,16 @@ handle_elf (int fd, Elf *elf, const char
@@ -865,12 +885,16 @@ handle_elf (int fd, Elf *elf, const char
}
/* Handle references through sh_info. */
@ -1631,7 +1676,7 @@
/* Mark the section as investigated. */
shdr_info[cnt].idx = 2;
@@ -995,7 +1019,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -1011,7 +1035,7 @@ handle_elf (int fd, Elf *elf, const char
error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"),
elf_errmsg (-1));
@ -1640,7 +1685,7 @@
/* Add this name to the section header string table. */
shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0);
@@ -1032,7 +1056,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -1048,7 +1072,7 @@ handle_elf (int fd, Elf *elf, const char
error (EXIT_FAILURE, 0,
gettext ("while create section header section: %s"),
elf_errmsg (-1));
@ -1649,7 +1694,7 @@
shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn);
if (shdr_info[cnt].data == NULL)
@@ -1089,7 +1113,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -1105,7 +1129,7 @@ handle_elf (int fd, Elf *elf, const char
error (EXIT_FAILURE, 0,
gettext ("while create section header section: %s"),
elf_errmsg (-1));
@ -1658,7 +1703,7 @@
/* Finalize the string table and fill in the correct indices in the
section headers. */
@@ -1179,20 +1203,20 @@ handle_elf (int fd, Elf *elf, const char
@@ -1195,20 +1219,20 @@ handle_elf (int fd, Elf *elf, const char
shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn,
NULL);
@ -1682,7 +1727,7 @@
>= shdr_info[cnt].data->d_size / elsize);
}
@@ -1247,7 +1271,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -1263,7 +1287,7 @@ handle_elf (int fd, Elf *elf, const char
sec = shdr_info[sym->st_shndx].idx;
else
{
@ -1691,7 +1736,7 @@
sec = shdr_info[xshndx].idx;
}
@@ -1268,7 +1292,7 @@ handle_elf (int fd, Elf *elf, const char
@@ -1284,7 +1308,7 @@ handle_elf (int fd, Elf *elf, const char
nxshndx = sec;
}
@ -1700,7 +1745,7 @@
if ((inner != destidx || nshndx != sym->st_shndx
|| (shndxdata != NULL && nxshndx != xshndx))
@@ -1295,9 +1319,11 @@ handle_elf (int fd, Elf *elf, const char
@@ -1311,9 +1335,11 @@ handle_elf (int fd, Elf *elf, const char
{
size_t sidx = (sym->st_shndx != SHN_XINDEX
? sym->st_shndx : xshndx);
@ -1715,7 +1760,7 @@
}
}
@@ -1485,11 +1511,11 @@ handle_elf (int fd, Elf *elf, const char
@@ -1501,11 +1527,11 @@ handle_elf (int fd, Elf *elf, const char
{
GElf_Sym sym_mem;
GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);
@ -1729,7 +1774,7 @@
size_t hidx = elf_hash (name) % nbucket;
if (bucket[hidx] == 0)
@@ -1508,8 +1534,8 @@ handle_elf (int fd, Elf *elf, const char
@@ -1524,8 +1550,8 @@ handle_elf (int fd, Elf *elf, const char
else
{
/* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */
@ -1740,7 +1785,7 @@
Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf;
@@ -1539,11 +1565,11 @@ handle_elf (int fd, Elf *elf, const char
@@ -1555,11 +1581,11 @@ handle_elf (int fd, Elf *elf, const char
{
GElf_Sym sym_mem;
GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem);

View File

@ -1,8 +1,10 @@
Index: elfutils-0.155/libdwfl/linux-kernel-modules.c
===================================================================
--- elfutils-0.155.orig/libdwfl/linux-kernel-modules.c
+++ elfutils-0.155/libdwfl/linux-kernel-modules.c
@@ -601,8 +601,8 @@ check_module_notes (Dwfl_Module *mod)
---
libdwfl/linux-kernel-modules.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -608,8 +608,8 @@ check_module_notes (Dwfl_Module *mod)
int
dwfl_linux_kernel_report_kernel (Dwfl *dwfl)
{

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Tue Jan 28 19:22:04 UTC 2014 - tonyj@suse.com
- Update to 0.158:
- libdwfl:
- dwfl_core_file_report has new parameter executable.
- New functions dwfl_module_getsymtab_first_global,
dwfl_module_getsym_info and dwfl_module_addrinfo.
- Added unwinder with type Dwfl_Thread_Callbacks, opaque types
Dwfl_Thread and Dwfl_Frame and functions dwfl_attach_state,
dwfl_pid, dwfl_thread_dwfl, dwfl_thread_tid, dwfl_frame_thread,
dwfl_thread_state_registers, dwfl_thread_state_register_pc,
dwfl_getthread_frames, dwfl_getthreads, dwfl_thread_getframes
and dwfl_frame_pc.
- addr2line: New option -x to show the section an address was found in.
- stack: New utility that uses the new unwinder for processes and cores.
- backends: Unwinder support for i386, x86_64, s390, s390x, ppc and ppc64.
aarch64 support.
-------------------------------------------------------------------
Wed Nov 13 12:12:20 UTC 2013 - sweet_f_a@gmx.de

View File

@ -1,7 +1,7 @@
#
# spec file for package elfutils
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: elfutils
Version: 0.157
Version: 0.158
Release: 0
Summary: Higher-level library to access ELF
License: SUSE-GPL-2.0-with-OSI-exception

View File

@ -4,11 +4,14 @@ References: none
Update from K&R to ANSI prototype. This fix should go upstream.
Index: elfutils-0.155/libebl/eblopenbackend.c
===================================================================
--- elfutils-0.155.orig/libebl/eblopenbackend.c
+++ elfutils-0.155/libebl/eblopenbackend.c
@@ -249,10 +249,7 @@ fill_defaults (Ebl *result)
---
lib/dynamicsizehash.c | 5 +----
libebl/eblopenbackend.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -250,10 +250,7 @@ fill_defaults (Ebl *result)
/* Find an appropriate backend for the file associated with ELF. */
static Ebl *
@ -20,10 +23,8 @@ Index: elfutils-0.155/libebl/eblopenbackend.c
{
Ebl *result;
size_t cnt;
Index: elfutils-0.155/lib/dynamicsizehash.c
===================================================================
--- elfutils-0.155.orig/lib/dynamicsizehash.c
+++ elfutils-0.155/lib/dynamicsizehash.c
--- a/lib/dynamicsizehash.c
+++ b/lib/dynamicsizehash.c
@@ -44,10 +44,7 @@
@ -34,5 +35,5 @@ Index: elfutils-0.155/lib/dynamicsizehash.c
- TYPE val __attribute__ ((unused));
+lookup (NAME *htab, HASHTYPE hval, TYPE val __attribute__((unused)))
{
/* First hash function: simply take the modul but prevent zero. */
size_t idx = 1 + hval % htab->size;
/* First hash function: simply take the modul but prevent zero. Small values
can skip the division, which helps performance when this is common. */