Update ELF Tool Chain to r3614

MFC after:	1 week
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2018-04-27 13:59:24 +00:00
commit 715d1396d6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333063
23 changed files with 56 additions and 48 deletions

View file

@ -1,4 +1,4 @@
# $Id: Makefile 3107 2014-12-20 08:31:58Z kaiwang27 $
# $Id: Makefile 3608 2018-04-14 21:23:04Z jkoshy $
TOP= ..
@ -32,4 +32,6 @@ ${EXTRA_TARGETS}: ${PROG}
.if ${OS_HOST} == "OpenBSD"
CFLAGS+= -I/usr/local/include
LDFLAGS+= -L/usr/local/lib
.elif ${OS_HOST} == "DragonFly"
LDADD+= -lbz2
.endif

View file

@ -1,4 +1,4 @@
# $Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy $
# $Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy $
TOP= ..
@ -7,12 +7,12 @@ INCSDIR= /usr/include
.PHONY: all clean clobber depend obj
all depend obj:
all depend:
clean clobber:
rm -f ${CLEANFILES}
cleandepend:
rm -f .depend
rm -f ${.OBJDIR}/.depend
.include "${TOP}/mk/elftoolchain.inc.mk"

View file

@ -1,13 +1,15 @@
#
# Build recipes for Linux based operating systems.
#
# $Id: os.Linux.mk 2064 2011-10-26 15:12:32Z jkoshy $
# $Id: os.Linux.mk 3594 2018-04-11 18:26:50Z jkoshy $
_NATIVE_ELF_FORMAT = native-elf-format
.BEGIN: ${_NATIVE_ELF_FORMAT}.h
.if !make(obj)
.BEGIN: ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h
${_NATIVE_ELF_FORMAT}.h:
${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h:
${.CURDIR}/${_NATIVE_ELF_FORMAT} > ${.TARGET} || rm ${.TARGET}
.endif
CLEANFILES += ${_NATIVE_ELF_FORMAT}.h
CLEANFILES += ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h

View file

@ -1,4 +1,4 @@
# $Id: Makefile 3381 2016-01-30 19:39:47Z jkoshy $
# $Id: Makefile 3608 2018-04-14 21:23:04Z jkoshy $
TOP= ..
@ -18,7 +18,7 @@ LDADD= -lelf -lelftc
LDADD+= -larchive
.endif
.if defined(WITH_PE) && ${WITH_PE:tl} == "yes"
.if defined(WITH_PE) && ${WITH_PE} == "yes"
SRCS+= pe.c
CFLAGS+= -DWITH_PE=1
@ -51,4 +51,6 @@ ${EXTRA_TARGETS}: ${PROG}
.if ${OS_HOST} == "OpenBSD"
CFLAGS+= -I/usr/local/include
LDFLAGS+= -L/usr/local/lib
.elif ${OS_HOST} == "DragonFly"
LDADD+= -lbz2
.endif

View file

@ -36,7 +36,7 @@
#include "elfcopy.h"
ELFTC_VCSID("$Id: binary.c 3445 2016-04-20 19:08:30Z emaste $");
ELFTC_VCSID("$Id: binary.c 3611 2018-04-16 21:35:18Z jkoshy $");
/*
* Convert ELF object to `binary'. Sections with SHF_ALLOC flag set
@ -215,7 +215,7 @@ create_elf_from_binary(struct elfcopy *ecp, int ifd, const char *ifn)
if ((sym_basename = strdup(ifn)) == NULL)
err(1, "strdup");
for (p = sym_basename; *p != '\0'; p++)
if (!isalnum(*p))
if (!isalnum(*p & 0xFF))
*p = '_';
#define _GEN_SYMNAME(S) do { \
snprintf(name, sizeof(name), "%s%s%s", "_binary_", sym_basename, S); \

View file

@ -21,9 +21,9 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
.\" $Id: elfcopy.1 3426 2016-03-05 13:32:28Z emaste $
.\" $Id: elfcopy.1 3565 2017-08-31 02:24:19Z emaste $
.\"
.Dd April 20, 2017
.Dd August 30, 2017
.Os
.Dt ELFCOPY 1
.Sh NAME

View file

@ -39,7 +39,7 @@
#include "elfcopy.h"
ELFTC_VCSID("$Id: main.c 3520 2017-04-17 01:47:52Z kaiwang27 $");
ELFTC_VCSID("$Id: main.c 3577 2017-09-14 02:19:42Z emaste $");
enum options
{

View file

@ -50,7 +50,7 @@
#include "_elftc.h"
ELFTC_VCSID("$Id: elfdump.c 3521 2017-06-04 20:07:09Z jkoshy $");
ELFTC_VCSID("$Id: elfdump.c 3584 2017-11-05 20:51:43Z jkoshy $");
#if defined(ELFTC_NEED_ELF_NOTE_DEFINITION)
#include "native-elf-format.h"
@ -915,7 +915,7 @@ elf_print_ar(struct elfdump *ed, int fd)
Elf_Arhdr *arh;
Elf_Arsym *arsym;
Elf_Cmd cmd;
char idx[10];
char idx[21];
size_t cnt, i;
ed->ar = ed->elf;
@ -1496,7 +1496,7 @@ elf_print_symtab(struct elfdump *ed, int i)
struct section *s;
const char *name;
uint16_t *vs;
char idx[10];
char idx[13];
Elf_Data *data;
GElf_Sym sym;
int len, j, elferr, nvs;
@ -1590,7 +1590,7 @@ elf_print_dynamic(struct elfdump *ed)
{
struct section *s;
const char *name;
char idx[10];
char idx[13];
Elf_Data *data;
GElf_Dyn dyn;
int elferr, i, len;
@ -2052,7 +2052,7 @@ elf_print_note(struct elfdump *ed)
size_t count;
int elferr, i;
uint8_t *src;
char idx[10];
char idx[17];
s = NULL;
for (i = 0; (size_t)i < ed->shnum; i++) {

View file

@ -1,6 +1,6 @@
# $Id: Makefile 3097 2014-09-02 22:10:18Z kaiwang27 $
# $Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy $
TOP= ${.CURDIR}/..
TOP= ..
LIB= dwarf

View file

@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: libdwarf.h 3295 2016-01-08 22:08:10Z jkoshy $
* $Id: libdwarf.h 3578 2017-09-14 02:21:28Z emaste $
*/
#ifndef _LIBDWARF_H_

View file

@ -26,7 +26,7 @@
#include "_libdwarf.h"
ELFTC_VCSID("$Id: libdwarf_frame.c 3106 2014-12-19 16:00:58Z kaiwang27 $");
ELFTC_VCSID("$Id: libdwarf_frame.c 3589 2018-03-13 20:34:33Z kaiwang27 $");
static int
_dwarf_frame_find_cie(Dwarf_FrameSec fs, Dwarf_Unsigned offset,
@ -142,6 +142,8 @@ _dwarf_frame_parse_lsb_cie_augment(Dwarf_Debug dbg, Dwarf_Cie cie,
augdata_p = cie->cie_augdata;
while (*aug_p != '\0') {
switch (*aug_p) {
case 'S':
break;
case 'L':
/* Skip one augment in augment data. */
augdata_p++;

View file

@ -26,7 +26,7 @@
#include "_libdwarf.h"
ELFTC_VCSID("$Id: libdwarf_reloc.c 3198 2015-05-14 18:36:19Z emaste $");
ELFTC_VCSID("$Id: libdwarf_reloc.c 3578 2017-09-14 02:21:28Z emaste $");
Dwarf_Unsigned
_dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64)

View file

@ -1,6 +1,6 @@
# $Id: Makefile 2605 2012-10-02 17:52:20Z jkoshy $
# $Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy $
TOP= ${.CURDIR}/..
TOP= ..
LIB= elf

View file

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: _libelf_config.h 3400 2016-02-12 18:38:49Z emaste $
* $Id: _libelf_config.h 3566 2017-08-31 02:28:40Z emaste $
*/
#if defined(__APPLE__) || defined(__DragonFly__)

View file

@ -31,7 +31,7 @@
#include "_libelf.h"
ELFTC_VCSID("$Id: gelf_phdr.c 3177 2015-03-30 18:19:41Z emaste $");
ELFTC_VCSID("$Id: gelf_phdr.c 3576 2017-09-14 02:15:29Z emaste $");
Elf32_Phdr *
elf32_getphdr(Elf *e)

View file

@ -31,7 +31,7 @@
#include "_libelf.h"
ELFTC_VCSID("$Id: libelf_ehdr.c 3174 2015-03-27 17:13:41Z emaste $");
ELFTC_VCSID("$Id: libelf_ehdr.c 3575 2017-09-14 02:13:36Z emaste $");
/*
* Retrieve counts for sections, phdrs and the section string table index

View file

@ -1,6 +1,6 @@
# $Id: Makefile 3489 2016-08-31 00:12:15Z emaste $
# $Id: Makefile 3601 2018-04-12 16:58:53Z jkoshy $
TOP= ${.CURDIR}/..
TOP= ..
LIB= elftc
@ -28,7 +28,8 @@ SHLIB_MAJOR= 1
WARNS?= 6
CLEANFILES+= elftc_version.c
ELFTC_VERSION_FILE= ${.OBJDIR}/elftc_version.c
CLEANFILES+= ${ELFTC_VERSION_FILE}
LDADD+= -lelf
@ -50,10 +51,10 @@ MLINKS= elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \
elftc_string_table_create.3 elftc_string_table_insert.3 \
elftc_string_table_create.3 elftc_string_table_lookup.3
.if !make(clean) && !make(clobber)
.if !make(clean) && !make(clobber) && !make(obj)
.BEGIN: .SILENT
${.CURDIR}/make-toolchain-version -t ${TOP} -r ${RELEASE} \
-h ${OS_HOST}
${.CURDIR}/make-toolchain-version -t ${.CURDIR}/${TOP} \
-r ${RELEASE} -h ${OS_HOST} -o ${ELFTC_VERSION_FILE}
.endif
.include "${TOP}/mk/elftoolchain.lib.mk"

View file

@ -37,7 +37,7 @@
#include "_libelftc.h"
ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3560 2017-06-25 00:28:23Z kaiwang27 $");
ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3583 2017-10-15 15:38:47Z emaste $");
/**
* @file cpp_demangle.c
@ -574,8 +574,7 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata,
if (!DEM_PUSH_STR(ddata, " imaginary"))
goto clean;
if (type_str != NULL) {
if (!vector_str_push(&subst_v, " imaginary",
10))
if (!VEC_PUSH_STR(&subst_v, " imaginary"))
goto clean;
if (!cpp_demangle_push_subst_v(ddata,
&subst_v))
@ -1616,8 +1615,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *ddata)
case SIMPLE_HASH('T', 'v'):
/* virtual function virtual override thunk */
if (!DEM_PUSH_STR(ddata,
"virtual function virtual override "))
if (!DEM_PUSH_STR(ddata, "virtual function virtual override "))
return (0);
ddata->cur += 2;
if (*ddata->cur == '\0')

View file

@ -1,6 +1,6 @@
# $Id: Makefile 3349 2016-01-18 21:09:16Z jkoshy $
# $Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy $
TOP= ${.CURDIR}/..
TOP= ..
LIB= pe

View file

@ -22,9 +22,9 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $Id: nm.1 3195 2015-05-12 17:22:19Z emaste $
.\" $Id: nm.1 3573 2017-09-14 02:06:31Z emaste $
.\"
.Dd May 21, 2017
.Dd September 13, 2017
.Os
.Dt NM 1
.Sh NAME

View file

@ -47,7 +47,7 @@
#include "_elftc.h"
ELFTC_VCSID("$Id: readelf.c 3519 2017-04-09 23:15:58Z kaiwang27 $");
ELFTC_VCSID("$Id: readelf.c 3580 2017-09-15 23:29:59Z emaste $");
/* Backwards compatability for older FreeBSD releases. */
#ifndef STB_GNU_UNIQUE
@ -822,6 +822,7 @@ dt_type(unsigned int mach, unsigned int dtype)
case DT_SUNW_RTLDINF: return "SUNW_RTLDINF";
case DT_SUNW_FILTER: return "SUNW_FILTER";
case DT_SUNW_CAP: return "SUNW_CAP";
case DT_SUNW_ASLR: return "SUNW_ASLR";
case DT_CHECKSUM: return "CHECKSUM";
case DT_PLTPADSZ: return "PLTPADSZ";
case DT_MOVEENT: return "MOVEENT";

View file

@ -46,7 +46,7 @@
#include "_elftc.h"
ELFTC_VCSID("$Id: strings.c 3498 2016-10-26 19:25:13Z emaste $");
ELFTC_VCSID("$Id: strings.c 3571 2017-09-14 02:04:50Z emaste $");
enum radix_style {
RADIX_DECIMAL,

View file

@ -6,5 +6,5 @@
const char *
elftc_version(void)
{
return "elftoolchain r3561M";
return "elftoolchain r3614M";
}