Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
6f00a46d
Commit
6f00a46d
authored
11 years ago
by
Tao Bai
Committed by
Johann
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Ouput symbols as c header file.
This is required by webrtc. Change-Id: I32983597eb0f6797aeb0d93b65d8911989ba98ea
parent
b2f0ae65
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/make/obj_int_extract.c
+14
-0
14 additions, 0 deletions
build/make/obj_int_extract.c
with
14 additions
and
0 deletions
build/make/obj_int_extract.c
+
14
−
0
View file @
6f00a46d
...
...
@@ -21,6 +21,7 @@ typedef enum {
OUTPUT_FMT_PLAIN
,
OUTPUT_FMT_RVDS
,
OUTPUT_FMT_GAS
,
OUTPUT_FMT_C_HEADER
,
}
output_fmt_t
;
int
log_msg
(
const
char
*
fmt
,
...)
{
...
...
@@ -46,6 +47,9 @@ int print_macho_equ(output_fmt_t mode, uint8_t* name, int val) {
case
OUTPUT_FMT_GAS
:
printf
(
".set %-40s, %5d
\n
"
,
name
,
val
);
return
0
;
case
OUTPUT_C_HEADER
:
printf
(
"#define %-40s %5d
\n
"
,
name
,
val
);
return
0
;
default:
log_msg
(
"Unsupported mode: %d"
,
mode
);
return
1
;
...
...
@@ -491,6 +495,13 @@ int parse_elf(uint8_t *buf, size_t sz, output_fmt_t mode) {
sym
.
st_name
),
val
);
break
;
case
OUTPUT_FMT_C_HEADER
:
printf
(
"#define %-40s %5d
\n
"
,
parse_elf_string_table
(
&
elf
,
shdr
.
sh_link
,
sym
.
st_name
),
val
);
break
;
default:
printf
(
"%s = %d
\n
"
,
parse_elf_string_table
(
&
elf
,
...
...
@@ -762,6 +773,7 @@ int main(int argc, char **argv) {
fprintf
(
stderr
,
"Output Formats:
\n
"
);
fprintf
(
stderr
,
" gas - compatible with GNU assembler
\n
"
);
fprintf
(
stderr
,
" rvds - compatible with armasm
\n
"
);
fprintf
(
stderr
,
" cheader - c/c++ header file
\n
"
);
goto
bail
;
}
...
...
@@ -771,6 +783,8 @@ int main(int argc, char **argv) {
mode
=
OUTPUT_FMT_RVDS
;
else
if
(
!
strcmp
(
argv
[
1
],
"gas"
))
mode
=
OUTPUT_FMT_GAS
;
else
if
(
!
strcmp
(
argv
[
1
],
"cheader"
))
mode
=
OUTPUT_FMT_C_HEADER
;
else
f
=
argv
[
1
];
...
...
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