Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Limkilde Svendsen
relibc
Commits
e14b3e09
Commit
e14b3e09
authored
4 years ago
by
Ahmed Abd El Mawgood
Browse files
Options
Downloads
Patches
Plain Diff
Add elf.h header to relibc
parent
db6a5894
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/bits/elf.h
+40
-0
40 additions, 0 deletions
include/bits/elf.h
src/header/elf/cbindgen.toml
+9
-0
9 additions, 0 deletions
src/header/elf/cbindgen.toml
src/header/elf/mod.rs
+976
-0
976 additions, 0 deletions
src/header/elf/mod.rs
src/header/mod.rs
+1
-0
1 addition, 0 deletions
src/header/mod.rs
with
1026 additions
and
0 deletions
include/bits/elf.h
0 → 100644
+
40
−
0
View file @
e14b3e09
#ifndef _BITS_ELF_H
#define _BITS_ELF_H
#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4)
#define ELF32_ST_TYPE(val) ((val) & 0xf)
#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf))
#define ELF64_ST_BIND(val) ELF32_ST_BIND (val)
#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val)
#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type))
#define ELF32_ST_VISIBILITY(o) ((o) & 0x03)
#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o)
#define ELF32_R_SYM(val) ((val) >> 8)
#define ELF32_R_TYPE(val) ((val) & 0xff)
#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
#define ELF64_R_SYM(i) ((i) >> 32)
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type))
#define DT_VALRNGHI 0x6ffffdff
#define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag))
#define DT_ADDRRNGHI 0x6ffffeff
#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag))
#define DT_VERNEEDNUM 0x6fffffff
#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag))
#define ELF32_M_SYM(info) ((info) >> 8)
#define ELF32_M_SIZE(info) ((unsigned char) (info))
#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size))
#define ELF64_M_SYM(info) ELF32_M_SYM (info)
#define ELF64_M_SIZE(info) ELF32_M_SIZE (info)
#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size)
#endif
/* ifdef _BITS_ELF_H*/
This diff is collapsed.
Click to expand it.
src/header/elf/cbindgen.toml
0 → 100644
+
9
−
0
View file @
e14b3e09
sys_includes
=
[
"bits/elf.h"
]
include_guard
=
"_ELF_H"
language
=
"C"
style
=
"Tag"
no_includes
=
true
cpp_compat
=
true
[enum]
prefix_with_name
=
true
This diff is collapsed.
Click to expand it.
src/header/elf/mod.rs
0 → 100644
+
976
−
0
View file @
e14b3e09
This diff is collapsed.
Click to expand it.
src/header/mod.rs
+
1
−
0
View file @
e14b3e09
...
...
@@ -7,6 +7,7 @@ pub mod dirent;
#[path
=
"dl-tls/mod.rs"
]
pub
mod
dl_tls
;
pub
mod
dlfcn
;
pub
mod
elf
;
pub
mod
errno
;
pub
mod
fcntl
;
pub
mod
float
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment