003 File Manager
Current Path:
/usr/src/contrib/elftoolchain/libelftc
usr
/
src
/
contrib
/
elftoolchain
/
libelftc
/
📁
..
📄
Makefile
(1.48 KB)
📄
Version.map
(296 B)
📄
_libelftc.h
(3.33 KB)
📄
elftc.3
(2.99 KB)
📄
elftc_bfd_find_target.3
(6.83 KB)
📄
elftc_bfdtarget.c
(2.18 KB)
📄
elftc_copyfile.3
(2.22 KB)
📄
elftc_copyfile.c
(2.92 KB)
📄
elftc_demangle.3
(3.45 KB)
📄
elftc_demangle.c
(2.98 KB)
📄
elftc_reloc_type_str.3
(2.36 KB)
📄
elftc_reloc_type_str.c
(30.64 KB)
📄
elftc_set_timestamps.3
(2.59 KB)
📄
elftc_set_timestamps.c
(2.49 KB)
📄
elftc_string_table.c
(9.36 KB)
📄
elftc_string_table_create.3
(6.7 KB)
📄
elftc_timestamp.3
(2.53 KB)
📄
elftc_timestamp.c
(1.91 KB)
📄
elftc_version.3
(2.75 KB)
📄
libelftc.h
(3.67 KB)
📄
libelftc_bfdtarget.c
(10.18 KB)
📄
libelftc_dem_arm.c
(22.61 KB)
📄
libelftc_dem_gnu2.c
(25.97 KB)
📄
libelftc_dem_gnu3.c
(86.29 KB)
📄
libelftc_hash.c
(2.2 KB)
📄
libelftc_vstr.c
(7.33 KB)
📄
make-toolchain-version
(2.76 KB)
📄
os.FreeBSD.mk
(182 B)
📄
os.Linux.mk
(87 B)
📄
os.NetBSD.mk
(74 B)
Editing: _libelftc.h
/*- * Copyright (c) 2009 Kai Wang * Copyright (c) 2007,2008 Hyogeol Lee <hyogeollee@gmail.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer * in this position and unchanged. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (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 3531 2017-06-05 05:08:43Z kaiwang27 $ */ #ifndef __LIBELFTC_H_ #define __LIBELFTC_H_ #include <stdbool.h> #include "_elftc.h" struct _Elftc_Bfd_Target { const char *bt_name; /* target name. */ unsigned int bt_type; /* target type. */ unsigned int bt_byteorder; /* elf target byteorder. */ unsigned int bt_elfclass; /* elf target class (32/64bit). */ unsigned int bt_machine; /* elf target arch. */ unsigned int bt_osabi; /* elf target abi. */ }; extern struct _Elftc_Bfd_Target _libelftc_targets[]; /** @brief Dynamic vector data for string. */ struct vector_str { /** Current size */ size_t size; /** Total capacity */ size_t capacity; /** String array */ char **container; }; #define BUFFER_GROWFACTOR 1.618 #define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR) #define ELFTC_FAILURE 0 #define ELFTC_ISDIGIT(C) (isdigit((C) & 0xFF)) #define ELFTC_SUCCESS 1 #define VECTOR_DEF_CAPACITY 8 #ifdef __cplusplus extern "C" { #endif char *cpp_demangle_ARM(const char *_org); char *cpp_demangle_gnu2(const char *_org); char *cpp_demangle_gnu3(const char *_org); bool is_cpp_mangled_ARM(const char *_org); bool is_cpp_mangled_gnu2(const char *_org); bool is_cpp_mangled_gnu3(const char *_org); unsigned int libelftc_hash_string(const char *); void vector_str_dest(struct vector_str *_vec); int vector_str_find(const struct vector_str *_vs, const char *_str, size_t _len); char *vector_str_get_flat(const struct vector_str *_vs, size_t *_len); 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, size_t _end, size_t *_rlen); #ifdef __cplusplus } #endif #endif /* __LIBELFTC_H */
Upload File
Create Folder