diff options
author | emaste <emaste@FreeBSD.org> | 2017-05-01 01:52:03 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2017-05-01 01:52:03 +0000 |
commit | f0bd9b16be9a08f7efde72adaa5de8a67048dc72 (patch) | |
tree | 4039f487800151cdf340a56e107ed863f9f8a97b /contrib/elftoolchain/elfcopy/main.c | |
parent | e5748c4457aeca479eab2224c7567dc48fab0b6e (diff) | |
download | FreeBSD-src-f0bd9b16be9a08f7efde72adaa5de8a67048dc72.zip FreeBSD-src-f0bd9b16be9a08f7efde72adaa5de8a67048dc72.tar.gz |
MFC r317075: Update ELF Tool Chain to upstream r3520
Highlights of changes between r3490 and r3520:
- Improve C++ demangling
- Improve compatibility with Binutils tools wrt. error messages
- Handle additional types/sections/etc. in readelf and elfdump
- addr2line, cxxfilt: use setvbuf to set line buffering for filter use
Also MFC r317076, version bump.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/elftoolchain/elfcopy/main.c')
-rw-r--r-- | contrib/elftoolchain/elfcopy/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/elftoolchain/elfcopy/main.c b/contrib/elftoolchain/elfcopy/main.c index e5cb06b..e8e1875 100644 --- a/contrib/elftoolchain/elfcopy/main.c +++ b/contrib/elftoolchain/elfcopy/main.c @@ -39,7 +39,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: main.c 3446 2016-05-03 01:31:17Z emaste $"); +ELFTC_VCSID("$Id: main.c 3520 2017-04-17 01:47:52Z kaiwang27 $"); enum options { @@ -285,6 +285,7 @@ create_elf(struct elfcopy *ecp) size_t ishnum; ecp->flags |= SYMTAB_INTACT; + ecp->flags &= ~SYMTAB_EXIST; /* Create EHDR. */ if (gelf_getehdr(ecp->ein, &ieh) == NULL) @@ -499,6 +500,10 @@ free_elf(struct elfcopy *ecp) } } + ecp->symtab = NULL; + ecp->strtab = NULL; + ecp->shstrtab = NULL; + if (ecp->secndx != NULL) { free(ecp->secndx); ecp->secndx = NULL; |