Update to ELF Tool Chain snapshot at r3561

This update is primarily bug fixes in C++ symbol demangling, including:

- rvalue reference
- builtin type auto and decltype(auto)
- revamped support for function return types
- formatting fixes
- omit void when its the only param
- ref-qualifiers and others in function types
- type qualifiers in pointer-to-member function types
- incorrect handling regarding CV-qualifiers in function types
- ref-qualifier found in nested-name
- properly handle <name> ::= <substitute><template-args>
- make sure that nested function name is not a substitute candidate
- correctly handle expression in template args
- skip unknown substitution abbreviations

MFC after:	4 days
This commit is contained in:
Ed Maste 2017-06-25 22:39:28 +00:00
commit 18f4c9db68
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320343
4 changed files with 620 additions and 192 deletions

View File

@ -50,7 +50,7 @@
#include "_elftc.h"
ELFTC_VCSID("$Id: elfdump.c 3497 2016-10-17 20:57:22Z emaste $");
ELFTC_VCSID("$Id: elfdump.c 3521 2017-06-04 20:07:09Z jkoshy $");
#if defined(ELFTC_NEED_ELF_NOTE_DEFINITION)
#include "native-elf-format.h"
@ -2226,8 +2226,8 @@ elf_print_svr4_hash64(struct elfdump *ed, struct section *s)
uint64_t *buf;
uint64_t *bucket, *chain;
uint64_t nbucket, nchain;
uint64_t *bl, *c, maxl, total;
uint64_t i, j;
uint64_t *bl, *c, j, maxl, total;
size_t i;
int elferr, first;
char idx[10];

View File

@ -24,7 +24,7 @@
* (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: _libelftc.h 3174 2015-03-27 17:13:41Z emaste $
* $Id: _libelftc.h 3531 2017-06-05 05:08:43Z kaiwang27 $
*/
#ifndef __LIBELFTC_H_
@ -82,6 +82,8 @@ bool vector_str_init(struct vector_str *_vs);
bool vector_str_pop(struct vector_str *_vs);
bool vector_str_push(struct vector_str *_vs, const char *_str,
size_t _len);
bool vector_str_push_vector(struct vector_str *_dst,
struct vector_str *_org);
bool vector_str_push_vector_head(struct vector_str *_dst,
struct vector_str *_org);
char *vector_str_substr(const struct vector_str *_vs, size_t _begin,

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
#include "_libelftc.h"
ELFTC_VCSID("$Id: libelftc_vstr.c 2065 2011-10-26 15:24:47Z jkoshy $");
ELFTC_VCSID("$Id: libelftc_vstr.c 3531 2017-06-05 05:08:43Z kaiwang27 $");
/**
* @file vector_str.c
@ -280,6 +280,47 @@ vector_str_push_vector_head(struct vector_str *dst, struct vector_str *org)
return (true);
}
/**
* @brief Push org vector to the tail of det vector.
* @return false at failed, true at success.
*/
bool
vector_str_push_vector(struct vector_str *dst, struct vector_str *org)
{
size_t i, j, tmp_cap;
char **tmp_ctn;
if (dst == NULL || org == NULL)
return (false);
tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR;
if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL)
return (false);
for (i = 0; i < dst->size; ++i)
tmp_ctn[i] = dst->container[i];
for (i = 0; i < org->size; ++i)
if ((tmp_ctn[i + dst->size] = strdup(org->container[i])) ==
NULL) {
for (j = 0; j < i + dst->size; ++j)
free(tmp_ctn[j]);
free(tmp_ctn);
return (false);
}
free(dst->container);
dst->container = tmp_ctn;
dst->capacity = tmp_cap;
dst->size += org->size;
return (true);
}
/**
* @brief Get new allocated flat string from vector between begin and end.
*