forked from pool/elfutils
155 lines
5.1 KiB
Diff
155 lines
5.1 KiB
Diff
--- libdwfl/Makefile.am-dist 2009-02-19 15:35:22.000000000 +0100
|
||
+++ libdwfl/Makefile.am 2009-02-19 15:36:58.000000000 +0100
|
||
@@ -33,7 +33,8 @@
|
||
else
|
||
AM_CFLAGS =
|
||
endif
|
||
-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99
|
||
+AM_CFLAGS += -Wall -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99
|
||
+AM_CFLAGS += -fgnu89-inline
|
||
INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
|
||
-I$(srcdir)/../libdw -I.. -I$(srcdir)/../lib
|
||
VERSION = 1
|
||
--- libdwfl/link_map.c-dist 2009-02-15 23:39:44.000000000 +0100
|
||
+++ libdwfl/link_map.c 2009-02-19 15:36:58.000000000 +0100
|
||
@@ -75,10 +75,10 @@
|
||
/* Examine an auxv data block and determine its format.
|
||
Return true iff we figured it out. */
|
||
static bool
|
||
-auxv_format_probe (const void *auxv, size_t size,
|
||
+auxv_format_probe (void *auxv, size_t size,
|
||
uint_fast8_t *elfclass, uint_fast8_t *elfdata)
|
||
{
|
||
- const union
|
||
+ union
|
||
{
|
||
char buf[size];
|
||
Elf32_auxv_t a32[size / sizeof (Elf32_auxv_t)];
|
||
@@ -301,7 +301,7 @@ report_r_debug (uint_fast8_t elfclass, u
|
||
return true;
|
||
}
|
||
|
||
- const union
|
||
+ union
|
||
{
|
||
Elf32_Addr a32[n];
|
||
Elf64_Addr a64[n];
|
||
@@ -568,7 +568,7 @@ consider_executable (Dwfl_Module *mod, G
|
||
d_val_vaddr, buffer_available,
|
||
memory_callback_arg))
|
||
{
|
||
- const union
|
||
+ union
|
||
{
|
||
Elf32_Addr a32;
|
||
Elf64_Addr a64;
|
||
@@ -626,10 +626,11 @@ find_executable (Dwfl *dwfl, GElf_Addr a
|
||
|
||
|
||
int
|
||
-dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size,
|
||
+dwfl_link_map_report (Dwfl *dwfl, const void *_auxv, size_t auxv_size,
|
||
Dwfl_Memory_Callback *memory_callback,
|
||
void *memory_callback_arg)
|
||
{
|
||
+ void *auxv = (void *)_auxv;
|
||
GElf_Addr r_debug_vaddr = 0;
|
||
|
||
uint_fast8_t elfclass = ELFCLASSNONE;
|
||
@@ -644,7 +645,7 @@ dwfl_link_map_report (Dwfl *dwfl, const
|
||
|
||
#define AUXV_SCAN(NN, BL) do \
|
||
{ \
|
||
- const Elf##NN##_auxv_t *av = auxv; \
|
||
+ Elf##NN##_auxv_t *av = auxv; \
|
||
for (size_t i = 0; i < auxv_size / sizeof av[0]; ++i) \
|
||
{ \
|
||
Elf##NN##_Addr val = BL##NN (av[i].a_un.a_val); \
|
||
@@ -718,7 +719,7 @@ dwfl_link_map_report (Dwfl *dwfl, const
|
||
(&out, &in, elfdata) != NULL))
|
||
{
|
||
/* We are looking for PT_DYNAMIC. */
|
||
- const union
|
||
+ union
|
||
{
|
||
Elf32_Phdr p32[phnum];
|
||
Elf64_Phdr p64[phnum];
|
||
@@ -806,7 +807,7 @@ dwfl_link_map_report (Dwfl *dwfl, const
|
||
(&out, &in, elfdata) != NULL))
|
||
{
|
||
/* We are looking for PT_DYNAMIC. */
|
||
- const union
|
||
+ union
|
||
{
|
||
Elf32_Dyn d32[dyn_filesz / sizeof (Elf32_Dyn)];
|
||
Elf64_Dyn d64[dyn_filesz / sizeof (Elf64_Dyn)];
|
||
--- libdw/Makefile.am-dist 2009-02-19 15:35:22.000000000 +0100
|
||
+++ libdw/Makefile.am 2009-02-19 15:36:58.000000000 +0100
|
||
@@ -35,6 +35,7 @@
|
||
AM_CFLAGS += -fpic
|
||
endif
|
||
AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 $(WEXTRA) -std=gnu99
|
||
+AM_CFLAGS += -fgnu89-inline
|
||
INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
|
||
VERSION = 1
|
||
|
||
--- libdw/libdw.h-dist 2008-12-10 23:21:29.000000000 +0100
|
||
+++ libdw/libdw.h 2009-02-19 15:36:58.000000000 +0100
|
||
@@ -67,7 +67,7 @@
|
||
#ifdef __GNUC_STDC_INLINE__
|
||
# define __libdw_extern_inline extern __inline __attribute__ ((__gnu_inline__))
|
||
#else
|
||
-# define __libdw_extern_inline extern __inline
|
||
+# define __libdw_extern_inline extern __inline __attribute__ ((gnu_inline))
|
||
#endif
|
||
|
||
|
||
--- src/Makefile.am-dist 2009-02-19 15:35:22.000000000 +0100
|
||
+++ src/Makefile.am 2009-02-19 15:37:25.000000000 +0100
|
||
@@ -37,6 +37,8 @@
|
||
$(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
|
||
$(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $(CFLAGS_$(*F))
|
||
|
||
+AM_CFLAGS += -fgnu89-inline
|
||
+
|
||
INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \
|
||
-I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \
|
||
-I$(srcdir)/../libasm -I$(srcdir)/../lib -I..
|
||
--- src/ldgeneric.c-dist 2008-12-10 23:21:30.000000000 +0100
|
||
+++ src/ldgeneric.c 2009-02-19 15:36:58.000000000 +0100
|
||
@@ -63,6 +63,14 @@ struct unw_eh_frame_hdr
|
||
};
|
||
#define EH_FRAME_HDR_VERSION 1
|
||
|
||
+static inline int popcount(unsigned int val)
|
||
+{
|
||
+ int count = 0;
|
||
+ for (; val; val >>= 1)
|
||
+ if (val & 1)
|
||
+ count++;
|
||
+ return count;
|
||
+}
|
||
|
||
/* Prototypes for local functions. */
|
||
static const char **ld_generic_lib_extensions (struct ld_state *)
|
||
@@ -5830,7 +5838,7 @@ cannot create dynamic symbol table for o
|
||
|
||
/* We need one more array which contains the hash codes of the
|
||
symbol names. */
|
||
- hashcodes = (Elf32_Word *) xcalloc (__builtin_popcount ((int) ld_state.hash_style)
|
||
+ hashcodes = (Elf32_Word *) xcalloc (popcount ((int) ld_state.hash_style)
|
||
* nsym_dyn_allocated,
|
||
sizeof (Elf32_Word));
|
||
gnuhashcodes = hashcodes;
|
||
--- backends/ia64_retval.c-dist 2008-12-10 23:21:28.000000000 +0100
|
||
+++ backends/ia64_retval.c 2009-02-19 15:36:58.000000000 +0100
|
||
@@ -96,7 +96,7 @@ hfa_type (Dwarf_Die *typedie, const Dwar
|
||
If we find a datum that's not the same FP type as the first datum, punt.
|
||
If we count more than eight total homogeneous FP data, punt. */
|
||
|
||
- inline int hfa (const Dwarf_Op *loc, int nregs)
|
||
+ inline __attribute__((gnu_inline)) int hfa (const Dwarf_Op *loc, int nregs)
|
||
{
|
||
if (fpregs_used == 0)
|
||
*locp = loc;
|