Update to 0.160.

This commit is contained in:
Mark Wielaard 2014-08-27 12:05:19 +02:00
parent f586210c4c
commit c8523f8a3b
11 changed files with 59 additions and 898 deletions

6
.gitignore vendored
View File

@ -1,7 +1,3 @@
/elfutils-0.156.tar.bz2
/elfutils-0.157.tar.bz2
/funcretval_test_aarch64.bz2
/hello_aarch64.ko.bz2
/testfile_aarch64_core.bz2
/elfutils-0.158.tar.bz2
/elfutils-0.159.tar.bz2
/elfutils-0.160.tar.bz2

View File

@ -1,23 +0,0 @@
commit 5e9668ccaf3d34567b313b13327ff9b31e4e5ba6
Author: Mark Wielaard <mjw@redhat.com>
Date: Fri Jul 4 13:26:12 2014 +0200
backends: aarch64_return_value_location should handle DW_ATE_boolean.
Found with run-native-test.sh om debian arm64.
http://bugs.debian.org/753552
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/backends/aarch64_retval.c b/backends/aarch64_retval.c
index 0ed7d56..68de307 100644
--- a/backends/aarch64_retval.c
+++ b/backends/aarch64_retval.c
@@ -357,6 +357,7 @@ aarch64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
size of the argument is less than or equal to 8 bytes
[...] the argument is copied to the least significant
bits in x[NGRN]. */
+ case DW_ATE_boolean:
case DW_ATE_signed:
case DW_ATE_unsigned:
case DW_ATE_unsigned_char:

View File

@ -1,359 +0,0 @@
commit 68b1afa36d2389c4f2fb526d0b134e5a3c68dedb
Author: Mark Wielaard <mjw@redhat.com>
Date: Tue Jun 10 15:09:23 2014 +0200
libdwfl: dwfl_standard_argp should not fail when not able to attach Dwfl.
As pointed out in https://bugzilla.redhat.com/show_bug.cgi?id=1107654
commit 191080 introduced a thinko that caused dwfl_standard_argp
to fail if the Dwfl couldn't be attached. Instead of generating a warning
as the comment intended, the failure would be fatal. But even warning
about dwfl_core_file_attach () or dwfl_linux_proc_attach () failing
would be a mistake. The caller/user might not be interested in such
a non-fatal issue. So just ignore if the call failed for whatever reason.
If the caller is interested in warning up front about this issue, then
dwfl_pid () should be called to check the Dwfl is attached. Things should
work just fine for anything that doesn't call any of the dwfl_state related
functions.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c
index 8d2bc6a..42b7e78 100644
--- a/libdwfl/argp-std.c
+++ b/libdwfl/argp-std.c
@@ -171,10 +171,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
if (result != 0)
return fail (dwfl, result, arg);
- result = INTUSE(dwfl_linux_proc_attach) (dwfl, atoi (arg), false);
- if (result != 0)
- /* Non-fatal to not be able to attach to process. */
- failure (dwfl, result, _("cannot attach to process"));
+ /* Non-fatal to not be able to attach to process, ignore error. */
+ INTUSE(dwfl_linux_proc_attach) (dwfl, atoi (arg), false);
+
opt->dwfl = dwfl;
}
else
@@ -301,10 +300,8 @@ parse_opt (int key, char *arg, struct argp_state *state)
return fail (dwfl, result, opt->core);
}
- result = INTUSE(dwfl_core_file_attach) (dwfl, core);
- if (result < 0)
- /* Non-fatal to not be able to attach to core. */
- failure (dwfl, result, _("cannot attach to core"));
+ /* Non-fatal to not be able to attach to core, ignore error. */
+ INTUSE(dwfl_core_file_attach) (dwfl, core);
/* From now we leak FD and CORE. */
commit 14beac3b6f22b8d7a054980f74c4f8d33b969fc4
Author: Mark Wielaard <mjw@redhat.com>
Date: Wed Jun 11 15:14:23 2014 +0200
libdwfl: Record dwfl_attach_state error and return it on failure.
When dwfl_attach_state fails functions that need the process state should
return the error that caused the attach to fail. Use this in the backtrace
test to signal any attach failure. This makes sure that architectures that
don't provide unwinder support get properly detected (and the tests SKIPs)
Also don't assert when trying to attach a non-core ELF file, but return an
error to indicate failure.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/libdwfl/dwfl_frame.c b/libdwfl/dwfl_frame.c
index fd0b9ae..f6f86c0 100644
--- a/libdwfl/dwfl_frame.c
+++ b/libdwfl/dwfl_frame.c
@@ -117,6 +117,7 @@ __libdwfl_process_free (Dwfl_Process *process)
if (process->ebl_close)
ebl_closebackend (process->ebl);
free (process);
+ dwfl->attacherr = DWFL_E_NOERROR;
}
/* Allocate new Dwfl_Process for DWFL. */
@@ -134,17 +135,24 @@ bool
dwfl_attach_state (Dwfl *dwfl, Elf *elf, pid_t pid,
const Dwfl_Thread_Callbacks *thread_callbacks, void *arg)
{
- if (thread_callbacks == NULL || thread_callbacks->next_thread == NULL
- || thread_callbacks->set_initial_registers == NULL)
+ if (dwfl->process != NULL)
{
- __libdwfl_seterrno (DWFL_E_INVALID_ARGUMENT);
+ __libdwfl_seterrno (DWFL_E_ATTACH_STATE_CONFLICT);
return false;
}
- if (dwfl->process != NULL)
+
+ /* Reset any previous error, we are just going to try again. */
+ dwfl->attacherr = DWFL_E_NOERROR;
+ if (thread_callbacks == NULL || thread_callbacks->next_thread == NULL
+ || thread_callbacks->set_initial_registers == NULL)
{
- __libdwfl_seterrno (DWFL_E_ATTACH_STATE_CONFLICT);
+ dwfl->attacherr = DWFL_E_INVALID_ARGUMENT;
+ fail:
+ dwfl->attacherr = __libdwfl_canon_error (dwfl->attacherr);
+ __libdwfl_seterrno (dwfl->attacherr);
return false;
}
+
Ebl *ebl;
bool ebl_close;
if (elf != NULL)
@@ -180,8 +188,8 @@ dwfl_attach_state (Dwfl *dwfl, Elf *elf, pid_t pid,
if (ebl == NULL)
{
/* Not identified EBL from any of the modules. */
- __libdwfl_seterrno (DWFL_E_PROCESS_NO_ARCH);
- return false;
+ dwfl->attacherr = DWFL_E_PROCESS_NO_ARCH;
+ goto fail;
}
process_alloc (dwfl);
Dwfl_Process *process = dwfl->process;
@@ -189,8 +197,8 @@ dwfl_attach_state (Dwfl *dwfl, Elf *elf, pid_t pid,
{
if (ebl_close)
ebl_closebackend (ebl);
- __libdwfl_seterrno (DWFL_E_NOMEM);
- return false;
+ dwfl->attacherr = DWFL_E_NOMEM;
+ goto fail;
}
process->ebl = ebl;
process->ebl_close = ebl_close;
@@ -204,6 +212,12 @@ INTDEF(dwfl_attach_state)
pid_t
dwfl_pid (Dwfl *dwfl)
{
+ if (dwfl->attacherr != DWFL_E_NOERROR)
+ {
+ __libdwfl_seterrno (dwfl->attacherr);
+ return -1;
+ }
+
if (dwfl->process == NULL)
{
__libdwfl_seterrno (DWFL_E_NO_ATTACH_STATE);
@@ -238,6 +252,12 @@ int
dwfl_getthreads (Dwfl *dwfl, int (*callback) (Dwfl_Thread *thread, void *arg),
void *arg)
{
+ if (dwfl->attacherr != DWFL_E_NOERROR)
+ {
+ __libdwfl_seterrno (dwfl->attacherr);
+ return -1;
+ }
+
Dwfl_Process *process = dwfl->process;
if (process == NULL)
{
@@ -309,6 +329,12 @@ getthread (Dwfl *dwfl, pid_t tid,
int (*callback) (Dwfl_Thread *thread, void *arg),
void *arg)
{
+ if (dwfl->attacherr != DWFL_E_NOERROR)
+ {
+ __libdwfl_seterrno (dwfl->attacherr);
+ return -1;
+ }
+
Dwfl_Process *process = dwfl->process;
if (process == NULL)
{
diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h
index 9b03d8a..30c0f8a 100644
--- a/libdwfl/libdwflP.h
+++ b/libdwfl/libdwflP.h
@@ -91,7 +91,8 @@ typedef struct Dwfl_Process Dwfl_Process;
DWFL_ERROR (ATTACH_STATE_CONFLICT, N_("Dwfl already has attached state")) \
DWFL_ERROR (NO_ATTACH_STATE, N_("Dwfl has no attached state")) \
DWFL_ERROR (NO_UNWIND, N_("Unwinding not supported for this architecture")) \
- DWFL_ERROR (INVALID_ARGUMENT, N_("Invalid argument"))
+ DWFL_ERROR (INVALID_ARGUMENT, N_("Invalid argument")) \
+ DWFL_ERROR (NO_CORE_FILE, N_("Not an ET_CORE ELF file"))
#define DWFL_ERROR(name, text) DWFL_E_##name,
typedef enum { DWFL_ERRORS DWFL_E_NUM } Dwfl_Error;
@@ -110,6 +111,7 @@ struct Dwfl
Dwfl_Module *modulelist; /* List in order used by full traversals. */
Dwfl_Process *process;
+ Dwfl_Error attacherr; /* Previous error attaching process. */
GElf_Addr offline_next_address;
diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c
index 1002788..7ef3f25 100644
--- a/libdwfl/linux-core-attach.c
+++ b/libdwfl/linux-core-attach.c
@@ -309,33 +309,41 @@ static const Dwfl_Thread_Callbacks core_thread_callbacks =
int
dwfl_core_file_attach (Dwfl *dwfl, Elf *core)
{
+ Dwfl_Error err = DWFL_E_NOERROR;
Ebl *ebl = ebl_openbackend (core);
if (ebl == NULL)
{
- __libdwfl_seterrno (DWFL_E_LIBEBL);
+ err = DWFL_E_LIBEBL;
+ fail_err:
+ if (dwfl->process == NULL && dwfl->attacherr == DWFL_E_NOERROR)
+ dwfl->attacherr = __libdwfl_canon_error (err);
+ __libdwfl_seterrno (err);
return -1;
}
size_t nregs = ebl_frame_nregs (ebl);
if (nregs == 0)
{
- __libdwfl_seterrno (DWFL_E_NO_UNWIND);
+ err = DWFL_E_NO_UNWIND;
+ fail:
ebl_closebackend (ebl);
- return -1;
+ goto fail_err;
}
GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (core, &ehdr_mem);
if (ehdr == NULL)
{
- __libdwfl_seterrno (DWFL_E_LIBELF);
- ebl_closebackend (ebl);
- return -1;
+ err = DWFL_E_LIBELF;
+ goto fail;
+ }
+ if (ehdr->e_type != ET_CORE)
+ {
+ err = DWFL_E_NO_CORE_FILE;
+ goto fail;
}
- assert (ehdr->e_type == ET_CORE);
size_t phnum;
if (elf_getphdrnum (core, &phnum) < 0)
{
- __libdwfl_seterrno (DWFL_E_LIBELF);
- ebl_closebackend (ebl);
- return -1;
+ err = DWFL_E_LIBELF;
+ goto fail;
}
pid_t pid = -1;
Elf_Data *note_data = NULL;
@@ -351,8 +359,8 @@ dwfl_core_file_attach (Dwfl *dwfl, Elf *core)
}
if (note_data == NULL)
{
- ebl_closebackend (ebl);
- return DWFL_E_LIBELF;
+ err = DWFL_E_LIBELF;
+ goto fail;
}
size_t offset = 0;
GElf_Nhdr nhdr;
@@ -394,16 +402,14 @@ dwfl_core_file_attach (Dwfl *dwfl, Elf *core)
if (pid == -1)
{
/* No valid NT_PRPSINFO recognized in this CORE. */
- __libdwfl_seterrno (DWFL_E_BADELF);
- ebl_closebackend (ebl);
- return -1;
+ err = DWFL_E_BADELF;
+ goto fail;
}
struct core_arg *core_arg = malloc (sizeof *core_arg);
if (core_arg == NULL)
{
- __libdwfl_seterrno (DWFL_E_NOMEM);
- ebl_closebackend (ebl);
- return -1;
+ err = DWFL_E_NOMEM;
+ goto fail;
}
core_arg->core = core;
core_arg->note_data = note_data;
diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
index 8aee721..d60955e 100644
--- a/libdwfl/linux-pid-attach.c
+++ b/libdwfl/linux-pid-attach.c
@@ -290,13 +290,23 @@ dwfl_linux_proc_attach (Dwfl *dwfl, pid_t pid, bool assume_ptrace_stopped)
{
char buffer[36];
FILE *procfile;
+ int err = 0; /* The errno to return and set for dwfl->attcherr. */
/* Make sure to report the actual PID (thread group leader) to
dwfl_attach_state. */
snprintf (buffer, sizeof (buffer), "/proc/%ld/status", (long) pid);
procfile = fopen (buffer, "r");
if (procfile == NULL)
- return errno;
+ {
+ err = errno;
+ fail:
+ if (dwfl->process == NULL && dwfl->attacherr == DWFL_E_NOERROR)
+ {
+ errno = err;
+ dwfl->attacherr = __libdwfl_canon_error (DWFL_E_ERRNO);
+ }
+ return err;
+ }
char *line = NULL;
size_t linelen = 0;
@@ -317,19 +327,26 @@ dwfl_linux_proc_attach (Dwfl *dwfl, pid_t pid, bool assume_ptrace_stopped)
fclose (procfile);
if (pid == 0)
- return ESRCH;
+ {
+ err = ESRCH;
+ goto fail;
+ }
char dirname[64];
int i = snprintf (dirname, sizeof (dirname), "/proc/%ld/task", (long) pid);
assert (i > 0 && i < (ssize_t) sizeof (dirname) - 1);
DIR *dir = opendir (dirname);
if (dir == NULL)
- return errno;
+ {
+ err = errno;
+ goto fail;
+ }
struct __libdwfl_pid_arg *pid_arg = malloc (sizeof *pid_arg);
if (pid_arg == NULL)
{
closedir (dir);
- return ENOMEM;
+ err = ENOMEM;
+ goto fail;
}
pid_arg->dir = dir;
pid_arg->tid_attached = 0;
diff --git a/tests/backtrace.c b/tests/backtrace.c
index 1a4709b..ce0bd17 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -1,5 +1,5 @@
/* Test program for unwinding of frames.
- Copyright (C) 2013 Red Hat, Inc.
+ Copyright (C) 2013, 2014 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -459,6 +459,9 @@ main (int argc __attribute__ ((unused)), char **argv)
};
(void) argp_parse (&argp, argc, argv, 0, NULL, &dwfl);
assert (dwfl != NULL);
+ /* We want to make sure the dwfl was properly attached. */
+ if (dwfl_pid (dwfl) < 0)
+ error (2, 0, "dwfl_pid: %s", dwfl_errmsg (-1));
dump (dwfl);
dwfl_end (dwfl);
return 0;

View File

@ -1,70 +0,0 @@
commit 16e2d351bf31d0ce09ce9632ff196cbd973b656b
Author: Mark Wielaard <mjw@redhat.com>
Date: Fri Jul 4 13:39:18 2014 +0200
Update elf.h from glibc.
Includes new bits needed for ppc64le ELFv2 abi.
https://bugzilla.redhat.com/show_bug.cgi?id=1110249
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/libelf/elf.h b/libelf/elf.h
index a05ea3b..40e87b2 100644
--- a/libelf/elf.h
+++ b/libelf/elf.h
@@ -1,5 +1,5 @@
/* This file defines standard ELF types, structures, and macros.
- Copyright (C) 1995-2013 Free Software Foundation, Inc.
+ Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -2252,6 +2252,17 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */
#define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */
#define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */
+#define R_PPC64_TLSGD 107 /* none (sym+add)@tlsgd */
+#define R_PPC64_TLSLD 108 /* none (sym+add)@tlsld */
+#define R_PPC64_TOCSAVE 109 /* none */
+
+/* Added when HA and HI relocs were changed to report overflows. */
+#define R_PPC64_ADDR16_HIGH 110
+#define R_PPC64_ADDR16_HIGHA 111
+#define R_PPC64_TPREL16_HIGH 112
+#define R_PPC64_TPREL16_HIGHA 113
+#define R_PPC64_DTPREL16_HIGH 114
+#define R_PPC64_DTPREL16_HIGHA 115
/* GNU extension to support local ifunc. */
#define R_PPC64_JMP_IREL 247
@@ -2261,12 +2272,29 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_PPC64_REL16_HI 251 /* half16 (sym+add-.)@h */
#define R_PPC64_REL16_HA 252 /* half16 (sym+add-.)@ha */
+/* e_flags bits specifying ABI.
+ 1 for original function descriptor using ABI,
+ 2 for revised ABI without function descriptors,
+ 0 for unspecified or not using any features affected by the differences. */
+#define EF_PPC64_ABI 3
+
/* PowerPC64 specific values for the Dyn d_tag field. */
#define DT_PPC64_GLINK (DT_LOPROC + 0)
#define DT_PPC64_OPD (DT_LOPROC + 1)
#define DT_PPC64_OPDSZ (DT_LOPROC + 2)
+#define DT_PPC64_OPT (DT_LOPROC + 3)
#define DT_PPC64_NUM 3
+/* PowerPC64 specific values for the DT_PPC64_OPT Dyn entry. */
+#define PPC64_OPT_TLS 1
+#define PPC64_OPT_MULTI_TOC 2
+
+/* PowerPC64 specific values for the Elf64_Sym st_other field. */
+#define STO_PPC64_LOCAL_BIT 5
+#define STO_PPC64_LOCAL_MASK (7 << STO_PPC64_LOCAL_BIT)
+#define PPC64_LOCAL_ENTRY_OFFSET(other) \
+ (((1 << (((other) & STO_PPC64_LOCAL_MASK) >> STO_PPC64_LOCAL_BIT)) >> 2) << 2)
+
/* ARM specific declarations */

View File

@ -1,24 +0,0 @@
Subject: [PATCH] libdwfl: Handle LZMA .ko.xz compressed kernel modules.
Linux kernel modules can not just be compressed with gz and bz2, but also
with xz.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
index 1ad7d2f..e4065d8 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -302,6 +302,9 @@ check_suffix (const FTSENT *f, size_t namelen)
#if USE_BZLIB
TRY (".ko.bz2");
#endif
+#if USE_LZMA
+ TRY (".ko.xz");
+#endif
return 0;
--
1.8.3.1

View File

@ -1,99 +0,0 @@
commit a95c4ad24cf83b2b0273fee73162bf476cebec8f
Author: Mark Wielaard <mjw@redhat.com>
Date: Fri Jul 4 14:30:48 2014 +0200
Add ppc64le ELFv2 abi support to backends and elflint.
The big endian vs little endian changes are already handled by detecting
the EI_DATA data encoding. And the function descriptors are already not
used when we see there is no .opd section. This change adds new checks
for st_other bits, new relocations and recognizes DT_PPC64_OPT.
Signed-off-by: Menanteau Guy <menantea@linux.vnet.ibm.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/backends/ppc64_init.c b/backends/ppc64_init.c
index e52231c..7ea2b23 100644
--- a/backends/ppc64_init.c
+++ b/backends/ppc64_init.c
@@ -61,6 +61,7 @@ ppc64_init (elf, machine, eh, ehlen)
HOOK (eh, machine_flag_check);
HOOK (eh, copy_reloc_p);
HOOK (eh, check_special_symbol);
+ HOOK (eh, check_st_other_bits);
HOOK (eh, bss_plt_p);
HOOK (eh, return_value_location);
HOOK (eh, register_info);
diff --git a/backends/ppc64_reloc.def b/backends/ppc64_reloc.def
index 6366f46..3a693cf 100644
--- a/backends/ppc64_reloc.def
+++ b/backends/ppc64_reloc.def
@@ -132,6 +132,21 @@ RELOC_TYPE (DTPREL16_HIGHER, REL)
RELOC_TYPE (DTPREL16_HIGHERA, REL)
RELOC_TYPE (DTPREL16_HIGHEST, REL)
RELOC_TYPE (DTPREL16_HIGHESTA, REL)
+RELOC_TYPE (TLSGD, REL)
+RELOC_TYPE (TLSLD, REL)
+RELOC_TYPE (TOCSAVE, REL)
+RELOC_TYPE (ADDR16_HIGH, REL)
+RELOC_TYPE (ADDR16_HIGHA, REL)
+RELOC_TYPE (TPREL16_HIGH, REL)
+RELOC_TYPE (TPREL16_HIGHA, REL)
+RELOC_TYPE (DTPREL16_HIGH, REL)
+RELOC_TYPE (DTPREL16_HIGHA, REL)
+RELOC_TYPE (JMP_IREL, REL)
+RELOC_TYPE (IRELATIVE, REL)
+RELOC_TYPE (REL16, REL)
+RELOC_TYPE (REL16_LO, REL)
+RELOC_TYPE (REL16_HI, REL)
+RELOC_TYPE (REL16_HA, REL)
/* Notes from Alan Modra:
diff --git a/backends/ppc64_symbol.c b/backends/ppc64_symbol.c
index 212d414..5a020d8 100644
--- a/backends/ppc64_symbol.c
+++ b/backends/ppc64_symbol.c
@@ -72,6 +72,8 @@ ppc64_dynamic_tag_name (int64_t tag, char *buf __attribute__ ((unused)),
return "PPC64_OPD";
case DT_PPC64_OPDSZ:
return "PPC64_OPDSZ";
+ case DT_PPC64_OPT:
+ return "PPC64_OPT";
default:
break;
}
@@ -84,7 +86,8 @@ ppc64_dynamic_tag_check (int64_t tag)
{
return (tag == DT_PPC64_GLINK
|| tag == DT_PPC64_OPD
- || tag == DT_PPC64_OPDSZ);
+ || tag == DT_PPC64_OPDSZ
+ || tag == DT_PPC64_OPT);
}
@@ -120,3 +123,9 @@ ppc64_machine_flag_check (GElf_Word flags)
{
return flags == 0 || flags == 1 || flags == 2;
}
+
+bool
+ppc64_check_st_other_bits (unsigned char st_other)
+{
+ return (PPC64_LOCAL_ENTRY_OFFSET (st_other) != 0);
+}
diff --git a/src/elflint.c b/src/elflint.c
index 5568c65..d6a4774 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -799,7 +799,8 @@ section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n"),
&& strcmp (name, "__fini_array_end") != 0
&& strcmp (name, "__bss_start") != 0
&& strcmp (name, "__bss_start__") != 0
- && strcmp (name, "__TMC_END__") != 0))
+ && strcmp (name, "__TMC_END__") != 0
+ && strcmp (name, ".TOC.") != 0))
ERROR (gettext ("\
section [%2d] '%s': symbol %zu: st_value out of bounds\n"),
idx, section_name (ebl, idx), cnt);

View File

@ -1,50 +0,0 @@
commit 475849fdb25265706772905b856cd7028c566a71
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date: Thu Jul 24 20:47:17 2014 +0200
Fix report_r_debug for prelinked libraries
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c
index 2913d9f..272f89b 100644
--- a/libdwfl/link_map.c
+++ b/libdwfl/link_map.c
@@ -321,7 +321,11 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata,
if (read_addrs (next, 4))
return release_buffer (-1);
- GElf_Addr l_addr = addrs[0];
+ /* Unused: l_addr is the difference between the address in memory
+ and the ELF file when the core was created. We need to
+ recalculate the difference below because the ELF file we use
+ might be differently pre-linked. */
+ // GElf_Addr l_addr = addrs[0];
GElf_Addr l_name = addrs[1];
GElf_Addr l_ld = addrs[2];
next = addrs[3];
@@ -432,11 +436,14 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata,
if (valid)
{
+ // It is like l_addr but it handles differently prelinked
+ // files at core dumping vs. core loading time.
+ GElf_Addr base = l_ld - elf_dynamic_vaddr;
if (r_debug_info_module == NULL)
{
// XXX hook for sysroot
mod = __libdwfl_report_elf (dwfl, basename (name),
- name, fd, elf, l_addr,
+ name, fd, elf, base,
true, true);
if (mod != NULL)
{
@@ -444,7 +451,7 @@ report_r_debug (uint_fast8_t elfclass, uint_fast8_t elfdata,
fd = -1;
}
}
- else if (__libdwfl_elf_address_range (elf, l_addr, true,
+ else if (__libdwfl_elf_address_range (elf, base, true,
true, NULL, NULL,
&r_debug_info_module->start,
&r_debug_info_module->end,

View File

@ -1,206 +0,0 @@
commit 5df2dc63e96808afb1602d4338e30dbca560a656
Author: Kyle McMartin <kyle@redhat.com>
Date: Mon Jun 9 21:06:26 2014 +0200
aarch64: use <sys/user.h> defined register structures
glibc now supplies these (compatible) structs instead of including the
kernel's <asm/ptrace.h> header, so let's use them. Annoyingly this will
cause new elfutils to FTBFS on old glibc, and vice versa. So include a
new configure check for the new struct names and use the old ones if
they are not avilable.
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c
index 2492d56..9706205 100644
--- a/backends/aarch64_initreg.c
+++ b/backends/aarch64_initreg.c
@@ -1,5 +1,5 @@
/* Fetch live process registers from TID.
- Copyright (C) 2013 Red Hat, Inc.
+ Copyright (C) 2013, 2014 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -36,6 +36,11 @@
# include <linux/uio.h>
# include <sys/user.h>
# include <sys/ptrace.h>
+/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
+# ifndef HAVE_SYS_USER_REGS
+# define user_regs_struct user_pt_regs
+# define user_fpsimd_struct user_fpsimd_state
+# endif
#endif
#define BACKEND aarch64_
@@ -51,7 +56,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
#else /* __aarch64__ */
/* General registers. */
- struct user_pt_regs gregs;
+ struct user_regs_struct gregs;
struct iovec iovec;
iovec.iov_base = &gregs;
iovec.iov_len = sizeof (gregs);
@@ -69,7 +74,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
/* ELR cannot be found. */
/* FP registers (only 64bits are used). */
- struct user_fpsimd_state fregs;
+ struct user_fpsimd_struct fregs;
iovec.iov_base = &fregs;
iovec.iov_len = sizeof (fregs);
if (ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iovec) != 0)
diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c
index 5837383..a0a9be9 100644
--- a/backends/arm_initreg.c
+++ b/backends/arm_initreg.c
@@ -40,6 +40,10 @@
# include <linux/uio.h>
# include <sys/user.h>
# include <sys/ptrace.h>
+/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
+# ifndef HAVE_SYS_USER_REGS
+# define user_regs_struct user_pt_regs
+# endif
#endif
#define BACKEND arm_
@@ -67,7 +71,7 @@ arm_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
#elif defined __aarch64__
/* Compat mode: arm compatible code running on aarch64 */
int i;
- struct user_pt_regs gregs;
+ struct user_regs_struct gregs;
struct iovec iovec;
iovec.iov_base = &gregs;
iovec.iov_len = sizeof (gregs);
diff --git a/configure.ac b/configure.ac
index 1d79597..f9c3c30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -301,6 +301,19 @@ eu_version=$(( (eu_version + 999) / 1000 ))
AC_CHECK_SIZEOF(long)
+# On aarch64 before glibc 2.20 we would get the kernel user_pt_regs instead
+# of the user_regs_struct from sys/user.h. They are structurally the same
+# but we get either one or the other.
+AC_CHECK_TYPE([struct user_regs_struct],
+ [sys_user_has_user_regs=yes], [sys_user_has_user_regs=no],
+ [[#include <sys/ptrace.h>]
+ [#include <sys/time.h>]
+ [#include <sys/user.h>]])
+if test "$sys_user_has_user_regs" = "yes"; then
+ AC_DEFINE(HAVE_SYS_USER_REGS, 1,
+ [Define to 1 if <sys/user.h> defines struct user_regs_struct])
+fi
+
# On a 64-bit host where can can use $CC -m32, we'll run two sets of tests.
# Likewise in a 32-bit build on a host where $CC -m64 works.
utrace_BIARCH
diff -ur elfutils-0.159.orig/configure elfutils-0.159/configure
--- elfutils-0.159.orig/configure 2014-07-18 14:30:42.842641862 +0200
+++ elfutils-0.159/configure 2014-07-18 14:31:24.142166792 +0200
@@ -1939,6 +1939,60 @@
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -6233,6 +6287,25 @@
+# On aarch64 before glibc 2.20 we would get the kernel user_pt_regs instead
+# of the user_regs_struct from sys/user.h. They are structurally the same
+# but we get either one or the other.
+ac_fn_c_check_type "$LINENO" "struct user_regs_struct" "ac_cv_type_struct_user_regs_struct" "#include <sys/ptrace.h>
+ #include <sys/time.h>
+ #include <sys/user.h>
+"
+if test "x$ac_cv_type_struct_user_regs_struct" = xyes; then :
+ sys_user_has_user_regs=yes
+else
+ sys_user_has_user_regs=no
+fi
+
+if test "$sys_user_has_user_regs" = "yes"; then
+
+$as_echo "#define HAVE_SYS_USER_REGS 1" >>confdefs.h
+
+fi
+
# On a 64-bit host where can can use $CC -m32, we'll run two sets of tests.
# Likewise in a 32-bit build on a host where $CC -m64 works.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $CC option for 32-bit word size" >&5
--- elfutils-0.159.orig/config.h.in 2014-07-18 14:30:42.813641492 +0200
+++ elfutils-0.159/config.h.in 2014-07-18 15:19:18.000000000 +0200
@@ -27,6 +27,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if <sys/user.h> defines struct user_regs_struct */
+#undef HAVE_SYS_USER_REGS
+
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

View File

@ -1,6 +1,6 @@
--- elfutils/backends/ChangeLog
+++ elfutils/backends/ChangeLog
@@ -364,6 +364,10 @@
@@ -413,6 +413,10 @@
* ppc_attrs.c (ppc_check_object_attribute): Handle tag
GNU_Power_ABI_Struct_Return.
@ -11,7 +11,7 @@
2008-10-04 Ulrich Drepper <drepper@redhat.com>
* i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
@@ -691,6 +695,11 @@
@@ -740,6 +744,11 @@
* sparc_init.c: Likewise.
* x86_64_init.c: Likewise.
@ -23,7 +23,7 @@
2005-11-19 Roland McGrath <roland@redhat.com>
* ppc64_reloc.def: REL30 -> ADDR30.
@@ -713,6 +722,9 @@
@@ -762,6 +771,9 @@
* Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
(CLEANFILES): Add libebl_$(m).so.
@ -98,7 +98,7 @@
libebl_i386.so: $(cpu_i386)
--- elfutils/ChangeLog
+++ elfutils/ChangeLog
@@ -148,6 +148,8 @@
@@ -170,6 +170,8 @@
2012-01-24 Mark Wielaard <mjw@redhat.com>
@ -107,7 +107,7 @@
* COPYING: Fix address. Updated version from gnulib.
2012-01-23 Mark Wielaard <mjw@redhat.com>
@@ -166,6 +168,9 @@
@@ -188,6 +190,9 @@
2011-10-08 Mike Frysinger <vapier@gentoo.org>
@ -117,7 +117,7 @@
* configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
2011-10-02 Ulrich Drepper <drepper@gmail.com>
@@ -187,6 +192,10 @@
@@ -209,6 +214,10 @@
* configure.ac (LOCALEDIR, DATADIRNAME): Removed.
@ -128,7 +128,7 @@
2009-09-21 Ulrich Drepper <drepper@redhat.com>
* configure.ac: Update for more modern autoconf.
@@ -195,6 +204,10 @@
@@ -217,6 +226,10 @@
* configure.ac (zip_LIBS): Check for liblzma too.
@ -139,7 +139,7 @@
2009-04-19 Roland McGrath <roland@redhat.com>
* configure.ac (eu_version): Round down here, not in version.h macros.
@@ -206,6 +219,8 @@
@@ -228,6 +241,8 @@
2009-01-23 Roland McGrath <roland@redhat.com>
@ -148,7 +148,7 @@
* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
@@ -286,6 +301,10 @@
@@ -308,6 +323,10 @@
* configure.ac: Add dummy automake conditional to get dependencies
for non-generic linker right. See src/Makefile.am.
@ -159,7 +159,7 @@
2005-11-18 Roland McGrath <roland@redhat.com>
* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
@@ -333,6 +352,17 @@
@@ -355,6 +374,17 @@
* Makefile.am (all_SUBDIRS): Add libdwfl.
* configure.ac: Write libdwfl/Makefile.
@ -179,7 +179,7 @@
* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
--- elfutils/config/ChangeLog
+++ elfutils/config/ChangeLog
@@ -58,6 +58,10 @@
@@ -62,6 +62,10 @@
* known-dwarf.awk: Use gawk.
@ -254,7 +254,7 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -99,4 +102,7 @@
@@ -102,4 +105,7 @@
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
@ -298,7 +298,7 @@
--enable-tests-rpath build $ORIGIN-using rpath into tests
--enable-libebl-subdir=DIR
install libebl_CPU modules in $(libdir)/DIR
@@ -4674,6 +4680,130 @@ if test "x$ac_cv_c99" != xyes; then :
@@ -4728,6 +4734,130 @@ if test "x$ac_cv_c99" != xyes; then :
as_fn_error $? "gcc with C99 support required" "$LINENO" 5
fi
@ -429,7 +429,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5
$as_echo_n "checking for __thread support... " >&6; }
if ${ac_cv_tls+:} false; then :
@@ -4710,7 +4840,13 @@ fi
@@ -4764,7 +4894,13 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5
$as_echo "$ac_cv_tls" >&6; }
if test "x$ac_cv_tls" != xyes; then :
@ -444,7 +444,7 @@
fi
# Check whether --enable-largefile was given.
@@ -5077,6 +5213,22 @@ else
@@ -5131,6 +5267,22 @@ else
fi
@ -467,7 +467,7 @@
# Check whether --enable-tests-rpath was given.
if test "${enable_tests_rpath+set}" = set; then :
enableval=$enable_tests_rpath; tests_use_rpath=$enableval
@@ -5800,7 +5952,7 @@ case "$eu_version" in
@@ -5854,7 +6006,7 @@ case "$eu_version" in
esac
# Round up to the next release API (x.y) version.
@ -476,7 +476,7 @@
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -6530,6 +6682,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes
@@ -6600,6 +6752,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes
as_fn_error $? "conditional \"BUILD_STATIC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
@ -807,7 +807,7 @@
$P.mnemonics)
--- elfutils/libdw/ChangeLog
+++ elfutils/libdw/ChangeLog
@@ -420,6 +420,10 @@
@@ -439,6 +439,10 @@
* Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
@ -818,7 +818,7 @@
2011-07-14 Mark Wielaard <mjw@redhat.com>
* libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
@@ -779,6 +783,10 @@
@@ -798,6 +802,10 @@
* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
@ -829,7 +829,7 @@
2009-08-10 Roland McGrath <roland@redhat.com>
* dwarf_getscopevar.c: Use dwarf_diename.
@@ -1547,6 +1555,11 @@
@@ -1566,6 +1574,11 @@
2005-05-31 Roland McGrath <roland@redhat.com>
@ -860,7 +860,7 @@
#endif
--- elfutils/libdw/libdw.h
+++ elfutils/libdw/libdw.h
@@ -891,7 +891,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
@@ -915,7 +915,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (
/* Inline optimizations. */
@ -881,7 +881,7 @@
noinst_PROGRAMS = $(am__EXEEXT_1)
subdir = libdw
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -295,6 +296,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -296,6 +297,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
@ -889,7 +889,7 @@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
@@ -326,6 +328,7 @@ SHELL = @SHELL@
@@ -327,6 +329,7 @@ SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = 1
@ -897,7 +897,7 @@
XGETTEXT = @XGETTEXT@
XGETTEXT_015 = @XGETTEXT_015@
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
@@ -387,10 +390,11 @@ top_srcdir = @top_srcdir@
@@ -388,10 +391,11 @@ top_srcdir = @top_srcdir@
zip_LIBS = @zip_LIBS@
AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \
-I$(srcdir)/../libelf
@ -957,7 +957,7 @@
textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
--- elfutils/libdwfl/ChangeLog
+++ elfutils/libdwfl/ChangeLog
@@ -421,6 +421,21 @@
@@ -467,6 +467,21 @@
(dwfl_module_addrsym) (i_to_symfile): New function.
(dwfl_module_addrsym) (search_table): Use it.
@ -979,7 +979,7 @@
2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Mark Wielaard <mjw@redhat.com>
@@ -2186,6 +2201,11 @@
@@ -2232,6 +2247,11 @@
2005-07-21 Roland McGrath <roland@redhat.com>
@ -1027,8 +1027,8 @@
+# endif
+#endif
#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#include "../libdw/memory-access.h"
--- elfutils/libdwfl/linux-pid-attach.c
+++ elfutils/libdwfl/linux-pid-attach.c
@@ -255,6 +255,11 @@ void
@ -1121,7 +1121,7 @@
libelf = ../libelf/libelf.so
--- elfutils/libebl/ChangeLog
+++ elfutils/libebl/ChangeLog
@@ -748,6 +748,11 @@
@@ -754,6 +754,11 @@
* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
tracking works right.
@ -1175,7 +1175,7 @@
textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then exit 1; fi
--- elfutils/libelf/ChangeLog
+++ elfutils/libelf/ChangeLog
@@ -135,6 +135,11 @@
@@ -139,6 +139,11 @@
* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
@ -1187,7 +1187,7 @@
2011-02-26 Mark Wielaard <mjw@redhat.com>
* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
@@ -812,6 +817,11 @@
@@ -816,6 +821,11 @@
* elf.h: Update from glibc.
@ -1347,7 +1347,7 @@
break;
--- elfutils/src/ChangeLog
+++ elfutils/src/ChangeLog
@@ -1112,8 +1112,16 @@
@@ -1155,8 +1155,16 @@
* readelf.c (attr_callback): Use print_block only when we don't use
print_ops.
@ -1364,7 +1364,7 @@
* ar.c (do_oper_extract): Use pathconf instead of statfs.
2009-08-01 Ulrich Drepper <drepper@redhat.com>
@@ -1277,6 +1285,8 @@
@@ -1320,6 +1328,8 @@
* readelf.c (print_debug_frame_section): Use t instead of j formats
for ptrdiff_t OFFSET.
@ -1373,7 +1373,7 @@
2009-01-21 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
@@ -1460,6 +1470,11 @@
@@ -1503,6 +1513,11 @@
that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really
is valid in RELRO.
@ -1385,7 +1385,7 @@
2008-02-29 Roland McGrath <roland@redhat.com>
* readelf.c (print_attributes): Add a cast.
@@ -1711,6 +1726,8 @@
@@ -1754,6 +1769,8 @@
* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
@ -1394,7 +1394,7 @@
2007-10-15 Roland McGrath <roland@redhat.com>
* make-debug-archive.in: New file.
@@ -2150,6 +2167,10 @@
@@ -2193,6 +2210,10 @@
* elflint.c (valid_e_machine): Add EM_ALPHA.
Reported by Christian Aichinger <Greek0@gmx.net>.
@ -1405,7 +1405,7 @@
2006-08-08 Ulrich Drepper <drepper@redhat.com>
* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
@@ -2226,6 +2247,10 @@
@@ -2269,6 +2290,10 @@
* Makefile.am: Add hacks to create dependency files for non-generic
linker.
@ -1416,7 +1416,7 @@
2006-06-12 Ulrich Drepper <drepper@redhat.com>
* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
@@ -2574,6 +2599,11 @@
@@ -2617,6 +2642,11 @@
* readelf.c (print_debug_loc_section): Fix indentation for larger
address size.
@ -1571,7 +1571,7 @@
findtextrel_LDADD = $(libdw) $(libelf)
--- elfutils/src/readelf.c
+++ elfutils/src/readelf.c
@@ -4239,10 +4239,12 @@ listptr_base (struct listptr *p)
@@ -4253,10 +4253,12 @@ listptr_base (struct listptr *p)
return base;
}
@ -1586,7 +1586,7 @@
struct listptr *p1 = (void *) a;
struct listptr *p2 = (void *) b;
@@ -4331,8 +4333,11 @@ static void
@@ -4345,8 +4347,11 @@ static void
sort_listptr (struct listptr_table *table, const char *name)
{
if (table->n > 0)
@ -1600,7 +1600,7 @@
}
static bool
@@ -9252,7 +9257,7 @@ dump_archive_index (Elf *elf, const char
@@ -9268,7 +9273,7 @@ dump_archive_index (Elf *elf, const char
if (unlikely (elf_rand (elf, as_off) == 0)
|| unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
== NULL))
@ -1712,7 +1712,7 @@
#ifndef __linux__
--- elfutils/tests/ChangeLog
+++ elfutils/tests/ChangeLog
@@ -283,6 +283,13 @@
@@ -304,6 +304,13 @@
2013-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
@ -1726,7 +1726,7 @@
* Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,
backtrace-data and backtrace-dwarf.
(BUILT_SOURCES, clean-local, backtrace-child-biarch): New.
@@ -1147,6 +1154,8 @@
@@ -1168,6 +1175,8 @@
2008-01-21 Roland McGrath <roland@redhat.com>
@ -1735,7 +1735,7 @@
* testfile45.S.bz2: Add tests for cltq, cqto.
* testfile45.expect.bz2: Adjust.
@@ -1855,6 +1864,11 @@
@@ -1876,6 +1885,11 @@
* Makefile.am (TESTS): Add run-elflint-test.sh.
(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.

View File

@ -1,7 +1,7 @@
Name: elfutils
Summary: A collection of utilities and DSOs to handle compiled objects
Version: 0.159
%global baserelease 10
Version: 0.160
%global baserelease 1
URL: https://fedorahosted.org/elfutils/
%global source_url http://fedorahosted.org/releases/e/l/elfutils/%{version}/
License: GPLv3+ and (GPLv2+ or LGPLv3+)
@ -45,13 +45,6 @@ Group: Development/Tools
Source: %{?source_url}%{name}-%{version}.tar.bz2
Patch1: %{?source_url}elfutils-portability.patch
Patch2: elfutils-aarch64-user_regs_struct.patch
Patch3: elfutils-0.159-argp-attach.patch
Patch4: elfutils-0.159-aarch64-bool-ret.patch
Patch5: elfutils-0.159-elf-h.patch
Patch6: elfutils-0.159-ppc64le-elfv2-abi.patch
Patch7: elfutils-0.159-report_r_debug.patch
Patch8: elfutils-0.159-ko_xz.patch
%if !%{compat}
Release: %{baserelease}%{?dist}
@ -214,14 +207,6 @@ sed -i.scanf-m -e 's/%m/%a/g' src/addr2line.c tests/line2addr.c
%endif
%endif
%patch2 -p1 -b .aa64~1
%patch3 -p1 -b .argp-attach
%patch4 -p1 -b .aarch64-ret-bool
%patch5 -p1 -b .elf-h
%patch6 -p1 -b .ppc64le-elfv2-abi
%patch7 -p1 -b .report_r_debug
%patch8 -p1 -b .ko_xz
find . -name \*.sh ! -perm -0100 -print | xargs chmod +x
%build
@ -349,6 +334,17 @@ rm -rf ${RPM_BUILD_ROOT}
%{_libdir}/libelf.a
%changelog
* Wed Aug 27 2014 Mark Wielaard <mjw@redhat.com> - 0.160-1
- Update to 0.160.
- Remove integrated upstream patches:
elfutils-aarch64-user_regs_struct.patch
elfutils-0.159-argp-attach.patch
elfutils-0.159-aarch64-bool-ret.patch
elfutils-0.159-elf-h.patch
elfutils-0.159-ppc64le-elfv2-abi.patch
elfutils-0.159-report_r_debug.patch
elfutils-0.159-ko_xz.patch
* Sat Aug 16 2014 Mark Wielaard <mjw@redhat.com> - 0.159-10
- Add elfutils-0.159-ko_xz.patch

View File

@ -1 +1 @@
1f45a18231c782ccd0966059e2e42ea9 elfutils-0.159.tar.bz2
7527f22dff8b1ac8c122cfc4d3d3bb1e elfutils-0.160.tar.bz2