Import ELF Tool Chain snapshot at r3561
From http://svn.code.sf.net/p/elftoolchain/code
This commit is contained in:
parent
8cc1f6cc64
commit
2b7f789ebf
@ -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];
|
||||
|
||||
|
@ -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
@ -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.
|
||||
*
|
||||
|
@ -2,16 +2,40 @@
|
||||
|
||||
all
|
||||
"Starting Test Suite"
|
||||
^builtin
|
||||
^misc
|
||||
^qualifiers
|
||||
^regression
|
||||
^substitute
|
||||
^template
|
||||
"Complete Test Suite"
|
||||
|
||||
builtin
|
||||
"Starting builtin Test"
|
||||
/ts/builtin/tc
|
||||
"Complete builtin Test"
|
||||
|
||||
misc
|
||||
"Starting misc Test"
|
||||
/ts/misc/tc
|
||||
"Complete misc Test"
|
||||
|
||||
qualifiers
|
||||
"Starting qualifiers Test"
|
||||
/ts/qualifiers/tc
|
||||
"Complete qualifiers Test"
|
||||
|
||||
regression
|
||||
"Starting regression Test"
|
||||
/ts/regression/tc
|
||||
"Complete regression Test"
|
||||
|
||||
substitute
|
||||
"Starting substitute Test"
|
||||
/ts/substitute/tc
|
||||
"Complete substitute Test"
|
||||
|
||||
template
|
||||
"Starting template Test"
|
||||
/ts/template/tc
|
||||
"Complete template Test"
|
||||
|
@ -2,7 +2,11 @@
|
||||
|
||||
TOP= ../../..
|
||||
|
||||
SUBDIR+= builtin
|
||||
SUBDIR+= misc
|
||||
SUBDIR+= qualifiers
|
||||
SUBDIR+= regression
|
||||
SUBDIR+= substitute
|
||||
SUBDIR+= template
|
||||
|
||||
.include "${TOP}/mk/elftoolchain.subdir.mk"
|
||||
|
5
test/cxxfilt/ts/builtin/Makefile
Normal file
5
test/cxxfilt/ts/builtin/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
# $Id$
|
||||
|
||||
TOP= ../../../..
|
||||
|
||||
.include "../common/ts.mk"
|
48
test/cxxfilt/ts/builtin/tclist
Normal file
48
test/cxxfilt/ts/builtin/tclist
Normal file
@ -0,0 +1,48 @@
|
||||
# <builtin-type> ::= v # void
|
||||
# ::= w # wchar_t
|
||||
# ::= b # bool
|
||||
# ::= c # char
|
||||
# ::= a # signed char
|
||||
# ::= h # unsigned char
|
||||
# ::= s # short
|
||||
# ::= t # unsigned short
|
||||
# ::= i # int
|
||||
# ::= j # unsigned int
|
||||
# ::= l # long
|
||||
# ::= m # unsigned long
|
||||
# ::= x # long long, __int64
|
||||
# ::= y # unsigned long long, __int64
|
||||
# ::= n # __int128
|
||||
# ::= o # unsigned __int128
|
||||
# ::= f # float
|
||||
# ::= d # double
|
||||
# ::= e # long double, __float80
|
||||
# ::= g # __float128
|
||||
# ::= z # ellipsis
|
||||
# ::= Dd # IEEE 754r decimal floating point (64 bits)
|
||||
# ::= De # IEEE 754r decimal floating point (128 bits)
|
||||
# ::= Df # IEEE 754r decimal floating point (32 bits)
|
||||
# ::= Dh # IEEE 754r half-precision floating point (16 bits)
|
||||
# ::= Di # char32_t
|
||||
# ::= Ds # char16_t
|
||||
# ::= Da # auto
|
||||
# ::= Dc # decltype(auto)
|
||||
# ::= Dn # std::nullptr_t (i.e., decltype(nullptr))
|
||||
# ::= u <source-name> # vendor extended type
|
||||
|
||||
"_Z3barv", "bar()"
|
||||
"_Z3barPv", "bar(void*)"
|
||||
"_Z3bariPv", "bar(int, void*)"
|
||||
"_Z3fooww", "foo(wchar_t, wchar_t)"
|
||||
"_Z3foob", "foo(bool)"
|
||||
"_Z3foocah", "foo(char, signed char, unsigned char)"
|
||||
"_Z3barstij", "bar(short, unsigned short, int, unsigned int)"
|
||||
"_Z3barlmxy", "bar(long, unsigned long, long long, unsigned long long)"
|
||||
"_Z3barno", "bar(__int128, unsigned __int128)"
|
||||
"_Z3foofdeg", "foo(float, double, long double, __float128)"
|
||||
"_Z3fooiPcz", "foo(int, char*, ...)"
|
||||
"_Z3fooDdDeDfDh", "foo(decimal64, decimal128, decimal32, half)"
|
||||
"_Z3barDiDs", "bar(char32_t, char16_t)"
|
||||
"_Z3barIiEDai", "auto bar<int>(int)"
|
||||
"_Z3barIiEDci", "decltype(auto) bar<int>(int)"
|
||||
"_Z3barIiEDni", "decltype(nullptr) bar<int>(int)"
|
@ -1,11 +1,11 @@
|
||||
# simple function
|
||||
|
||||
"_Z1f", "f"
|
||||
"_Z1fi", "f(int)"
|
||||
"_Z1fic", "f(int, char)"
|
||||
"_Z1f3bar", "f(bar)"
|
||||
"_Z1fFviE", "f(void (int))"
|
||||
|
||||
# namespace
|
||||
|
||||
"_ZN12elftoolchainE", "elftoolchain"
|
||||
"_ZN11elftoolchainE", "_ZN11elftoolchainE"
|
||||
"_ZN12elftoolchain", "_ZN12elftoolchain"
|
||||
@ -13,3 +13,39 @@
|
||||
"_ZN12elftoolchain3foo3barEi", "elftoolchain::foo::bar(int)"
|
||||
"_ZN12elftoolchain3foo3barEic", "elftoolchain::foo::bar(int, char)"
|
||||
|
||||
# non-static member function with qualifiers <nested-name>
|
||||
# N [<CV-qualifiers>] [<ref-qualifier>] <prefix> <unqualified-name> E
|
||||
"_ZNKR12elftoolchain3fooEi", "elftoolchain::foo(int) const &"
|
||||
"_ZNKO12elftoolchain3fooEi", "elftoolchain::foo(int) const &&"
|
||||
|
||||
# function type with qualifiers. (note that the place to encode qualifiers
|
||||
# is different than <nested-name>)
|
||||
# <function-type> ::= [<CV-qualifiers>] [Dx] F [Y] <bare-function-type>
|
||||
[<ref-qualifier>] E
|
||||
"_Z3fooKFviRE", "foo(void (int) const &)"
|
||||
"_Z3fooKFviOE", "foo(void (int) const &&)"
|
||||
|
||||
# Pointer-to-member type and type qualifiers
|
||||
# <pointer-to-member-type> ::= M <class type> <member type>
|
||||
"_Z3barM12elftoolchainFviE", "bar(void (elftoolchain::*)(int))"
|
||||
"_Z3barM12elftoolchainKFviRE", "bar(void (elftoolchain::*)(int) const &)"
|
||||
"_Z3fooFvvEM1AFvvE", "foo(void (), void (A::*)())"
|
||||
"_Z3fooPFvvEM1AFvvE", "foo(void (*)(), void (A::*)())"
|
||||
"_Z3fooPFvvREM1AFvvE", "foo(void (*)() &, void (A::*)())"
|
||||
"_Z3fooPFvvREM1AFvvOE", "foo(void (*)() &, void (A::*)() &&)"
|
||||
"_Z3fooKFvvREM1AFvvE", "foo(void () const &, void (A::*)())"
|
||||
"_Z3fooKPFvvREM1AFvvE", "foo(void (* const)() &, void (A::*)())"
|
||||
"_Z3fooPKFvvREM1AFvvE", "foo(void (*)() const &, void (A::*)())"
|
||||
"_Z3fooPKFvvREPM1AFvvE", "foo(void (*)() const &, void (A::**)())"
|
||||
"_Z3fooPKFviREPM1AFvidE", "foo(void (*)(int) const &, void (A::**)(int, double))"
|
||||
"_Z3fooPrKFvvREPKVM1APKFvvE", "foo(void (*)() const restrict &, void (* A::* volatile const*)() const)"
|
||||
|
||||
# local names
|
||||
|
||||
|
||||
|
||||
# abbreviation St
|
||||
"_ZSt3foo", '::std::foo'
|
||||
"_ZNSt3for3barE", 'std::for::bar'
|
||||
|
||||
# c++11 decltype
|
||||
|
5
test/cxxfilt/ts/qualifiers/Makefile
Normal file
5
test/cxxfilt/ts/qualifiers/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
# $Id$
|
||||
|
||||
TOP= ../../../..
|
||||
|
||||
.include "../common/ts.mk"
|
36
test/cxxfilt/ts/qualifiers/tclist
Normal file
36
test/cxxfilt/ts/qualifiers/tclist
Normal file
@ -0,0 +1,36 @@
|
||||
# <type> ::= <CV-qualifiers> <type>
|
||||
# ::= P <type> # pointer-to
|
||||
# ::= R <type> # reference-to
|
||||
# ::= O <type> # rvalue reference-to (C++0x)
|
||||
# ::= C <type> # complex pair (C 2000)
|
||||
# ::= G <type> # imaginary (C 2000)
|
||||
# ::= U <source-name> [<template-args>] <type> # vendor extended type qualifier
|
||||
|
||||
# <CV-qualifiers> ::= [r] [V] [K]
|
||||
"_Z3foorPirPirPi", "foo(int* restrict, int* restrict, int* restrict)"
|
||||
"_Z3fooVPd", "foo(double* volatile)"
|
||||
|
||||
# Pointer
|
||||
"_Z3fooPi", "foo(int*)"
|
||||
"_Z3fooPPi", "foo(int**)"
|
||||
"_Z3fooKPi", "foo(int* const)"
|
||||
"_Z3fooPKi", "foo(int const*)"
|
||||
"_Z3fooKPKi", "foo(int const* const)"
|
||||
"_Z3fooKPPi", "foo(int** const)"
|
||||
"_Z3fooPKPi", "foo(int* const*)"
|
||||
"_Z3fooPPKi", "foo(int const**)"
|
||||
"_Z3fooKPKPi", "foo(int* const* const)"
|
||||
|
||||
# Reference
|
||||
"_Z3barRi", "bar(int&)"
|
||||
"_Z3barRKi", "bar(int const&)"
|
||||
"_ZplR1XS0_", "operator+(X&, X&)"
|
||||
"_ZrsRK1XS1_", "operator>>(X const&, X const&)"
|
||||
"_ZN1XaSEO1X", "X::operator=(X&&)"
|
||||
|
||||
# Complex
|
||||
"_Z3fooCd", "foo(double complex)"
|
||||
"_Z3fooGdGf", "foo(double imaginary, float imaginary)"
|
||||
|
||||
# Vendor
|
||||
"_Z3fooPU3farc", "foo(char far*)"
|
5
test/cxxfilt/ts/substitute/Makefile
Normal file
5
test/cxxfilt/ts/substitute/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
# $Id$
|
||||
|
||||
TOP= ../../../..
|
||||
|
||||
.include "../common/ts.mk"
|
56
test/cxxfilt/ts/substitute/tclist
Normal file
56
test/cxxfilt/ts/substitute/tclist
Normal file
@ -0,0 +1,56 @@
|
||||
# <substitution> ::= S <seq-id> _
|
||||
# ::= S_
|
||||
|
||||
"_ZN1N1TIiiE2mfES_IddE", "N::T<int, int>::mf(N<double, double>)"
|
||||
"_ZN1N1TIiiE2mfES0_IddE", "N::T<int, int>::mf(N::T<double, double>)"
|
||||
"_ZN1N1TIiiE2mfES1_IddE", "N::T<int, int>::mf(N::T<int, int><double, double>)"
|
||||
"_ZN1N1TIiiE2mfES2_IddE", "_ZN1N1TIiiE2mfES2_IddE"
|
||||
# wrong result:
|
||||
# "_ZN1N1TIiiE2mfES2_IddE", "N::T<int, int>::mf(N::T<int, int>::mf<double, double>)"
|
||||
|
||||
"_ZN1f1gEP1hNS_1iE", "f::g(h*, f::i)"
|
||||
"_ZN1f1gEP1hNS0_1iE", "f::g(h*, h::i)"
|
||||
# wrong result:
|
||||
# "_ZN1f1gEP1hNS0_1iE", "f::g(h*, f::g::i)"
|
||||
"_ZN1f1gEP1hNS1_1iE", "f::g(h*, h*::i)"
|
||||
|
||||
"_Z3fooN1A1B1TES_", "foo(A::B::T, A)"
|
||||
"_Z3fooN1A1B1TES0_", "foo(A::B::T, A::B)"
|
||||
"_Z3fooN1A1B1TES1_", "foo(A::B::T, A::B::T)"
|
||||
|
||||
"_Z3foo5Hello5WorldS_S0_", "foo(Hello, World, Hello, World)"
|
||||
|
||||
# qualifiers with builtin type should be substitute candidates
|
||||
"_Z3fooPiS_", "foo(int*, int*)"
|
||||
"_Z3fooKPiS_", "foo(int* const, int*)"
|
||||
"_Z3fooKPiS0_", "foo(int* const, int* const)"
|
||||
"_Z3fooRKiS_", "foo(int const&, int const)"
|
||||
"_Z3fooRKiS0_", "foo(int const&, int const&)"
|
||||
"_Z3foorKiS_", "foo(int const restrict, int const restrict)"
|
||||
"_Z3fooPrKiS_", "foo(int const restrict*, int const restrict)"
|
||||
"_Z3fooPrKiS0_", "foo(int const restrict*, int const restrict*)"
|
||||
"_Z3foorPKiS_", "foo(int const* restrict, int const)"
|
||||
"_Z3foorPKiS0_", "foo(int const* restrict, int const*)"
|
||||
"_Z3foorPKiS1_", "foo(int const* restrict, int const* restrict)"
|
||||
"_Z3foorKPiS_", "foo(int* const restrict, int*)"
|
||||
"_Z3foorKPiS0_", "foo(int* const restrict, int* const restrict)"
|
||||
|
||||
# qualifers with non-builin type
|
||||
"_Z3fooP3BarS_", "foo(Bar*, Bar)"
|
||||
"_Z3fooP3BarS0_", "foo(Bar*, Bar*)"
|
||||
"_Z3fooPK3BarS_", "foo(Bar const*, Bar)"
|
||||
"_Z3fooPK3BarS1_", "foo(Bar const*, Bar const*)"
|
||||
"_Z3foorKP3BarS0_", "foo(Bar* const restrict, Bar*)"
|
||||
"_Z3foorKP3BarS1_", "foo(Bar* const restrict, Bar* const restrict)"
|
||||
|
||||
# vendor extended qualifiers and substitution
|
||||
# note that ABI requires that "the type with all the K, V, and r qualifiers
|
||||
# " plus any vendor extended types in the same order-insensitive set is
|
||||
# substitutible". Here vendor extended type is not handled as above
|
||||
# requirement.
|
||||
"_Z3fooU3barKiS_", "foo(int const bar, int const)"
|
||||
"_Z3fooU3barKiS0_", "foo(int const bar, int const bar)"
|
||||
|
||||
# bug introduced with a botched fix for omitting "void"
|
||||
"_Z3barvPvS_", "bar(void, void*, void*)"
|
||||
# wrong result: bar(void, void*, void, void*)
|
5
test/cxxfilt/ts/template/Makefile
Normal file
5
test/cxxfilt/ts/template/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
# $Id$
|
||||
|
||||
TOP= ../../../..
|
||||
|
||||
.include "../common/ts.mk"
|
10
test/cxxfilt/ts/template/tclist
Normal file
10
test/cxxfilt/ts/template/tclist
Normal file
@ -0,0 +1,10 @@
|
||||
# Misc
|
||||
"_Z1TIiE", "T<int>"
|
||||
"_Z1TIidE", "T<int, double>"
|
||||
"_Z1TIidET_T0_", "int T<int, double>(double)"
|
||||
"_ZN3Foo3BarIiiE1fEii", "Foo::Bar<int, int>::f(int, int)"
|
||||
"_ZN3Foo3BarIiiE1fIiiEEii", "int Foo::Bar<int, int>::f<int, int>(int)"
|
||||
"_ZN3Foo3BarIiiE1fE1TIiE", "Foo::Bar<int, int>::f(T<int>)"
|
||||
"_ZN3Foo3BarIiiE1fE1TIiEi", "Foo::Bar<int, int>::f(T<int>, int)"
|
||||
"_ZN3Foo3BarIiiE1fE1TIiEii", "Foo::Bar<int, int>::f(T<int>, int, int)"
|
||||
"_Z3foo1TIiEdh", "foo(T<int>, double, unsigned char)"
|
2
test/elfcopy/plugin/os.FreeBSD.mk
Normal file
2
test/elfcopy/plugin/os.FreeBSD.mk
Normal file
@ -0,0 +1,2 @@
|
||||
DPADD+= ${LIBBZ2}
|
||||
LDADD+= -lbz2
|
Loading…
x
Reference in New Issue
Block a user