elfutils: Update from 0.166 to 0.167

This commit is contained in:
Fredrik Fornwall 2016-09-26 08:08:13 -04:00
parent acbfec93ea
commit 7b467de9c7
3 changed files with 1 additions and 76 deletions

View File

@ -1,4 +1,4 @@
TERMUX_PKG_VERSION=0.166
TERMUX_PKG_VERSION=0.167
TERMUX_PKG_HOMEPAGE=https://fedorahosted.org/elfutils/
TERMUX_PKG_DESCRIPTION="ELF object file access library"
TERMUX_PKG_SRCURL=https://fedorahosted.org/releases/e/l/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2

View File

@ -1,15 +0,0 @@
diff -u -r ../elfutils-0.166/libebl/eblwstrtab.c ./libebl/eblwstrtab.c
--- ../elfutils-0.166/libebl/eblwstrtab.c 2015-08-21 08:22:37.000000000 -0400
+++ ./libebl/eblwstrtab.c 2016-05-04 13:11:26.834934000 -0400
@@ -294,6 +294,11 @@
return newstr;
}
+static wchar_t* wmempcpy(wchar_t* s1, const wchar_t* s2, size_t n)
+{
+ size_t bytes = n * sizeof(wchar_t);
+ return (wchar_t *) (memcpy((char *) s1, (char *) s2, bytes) + bytes);
+}
static void
copystrings (struct Ebl_WStrent *nodep, wchar_t **freep, size_t *offsetp)

View File

@ -1,60 +0,0 @@
diff -u -r ../elfutils-0.166/src/ldgeneric.c ./src/ldgeneric.c
--- ../elfutils-0.166/src/ldgeneric.c 2015-08-21 08:22:37.000000000 -0400
+++ ./src/ldgeneric.c 2016-05-04 15:20:09.029651147 -0400
@@ -1747,7 +1747,13 @@
/* The content of the file is available in memory. Read the
memory region as a stream. */
+#ifdef __ANDROID__
+ ldin = tmpfile();
+ fwrite(content, 1, contentsize, ldin);
+ rewind(ldin);
+#else
ldin = fmemopen (content, contentsize, "r");
+#endif
}
/* No need for locking. */
@@ -2631,9 +2637,9 @@
/* Callback function registered with on_exit to make sure the temporary
files gets removed if something goes wrong. */
static void
-remove_tempfile (int status, void *arg)
+remove_tempfile ()
{
- if (status != 0 && ld_state.tempfname != NULL)
+ if (ld_state.tempfname != NULL)
unlink (ld_state.tempfname);
}
@@ -2680,7 +2686,7 @@
/* Make sure we remove the temporary file in case something goes
wrong. */
- on_exit (remove_tempfile, NULL);
+ atexit (remove_tempfile);
/* Create the ELF file data for the output file. */
Elf *elf = ld_state.outelf = elf_begin (fd,
@@ -3352,6 +3358,7 @@
struct id_list search;
struct id_list *verp;
bool result = ld_state.default_bind_local;
+ size_t substr_len;
if (XELF_ST_BIND (sym->st_info) == STB_LOCAL || sym->st_shndx == SHN_UNDEF)
/* We don't have to do anything to local symbols here. */
@@ -3367,7 +3374,12 @@
version = strchr (str, VER_CHR);
if (version != NULL)
{
- search.id = strndupa (str, version - str);
+ substr_len = version - str;
+ char* tmp = alloca(substr_len+1);
+ strncpy(tmp, str, substr_len);
+ tmp[substr_len] = 0;
+ search.id = tmp;
+
if (*++version == VER_CHR)
/* Skip the second '@' signaling a default definition. */
++version;