Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7963fa06
Commit
7963fa06
authored
Jul 23, 2011
by
YAMAMOTO Mitsuharu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support LC_FUNCTION_STARTS load command on Darwin.
parent
f7912160
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
src/ChangeLog
src/ChangeLog
+7
-0
src/unexmacosx.c
src/unexmacosx.c
+37
-0
No files found.
src/ChangeLog
View file @
7963fa06
2011-07-23 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
and LC_VERSION_MIN_MACOSX.
(copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
(dump_it) [LC_FUNCTION_STARTS]: Use it.
2011-07-22 Chong Yidong <cyd@stupidchicken.com>
* frame.c (Fmodify_frame_parameters): In tty case, update the
...
...
src/unexmacosx.c
View file @
7963fa06
...
...
@@ -589,6 +589,16 @@ print_load_command_name (int lc)
case
LC_DYLD_INFO_ONLY
:
printf
(
"LC_DYLD_INFO_ONLY"
);
break
;
#endif
#ifdef LC_VERSION_MIN_MACOSX
case
LC_VERSION_MIN_MACOSX
:
printf
(
"LC_VERSION_MIN_MACOSX"
);
break
;
#endif
#ifdef LC_FUNCTION_STARTS
case
LC_FUNCTION_STARTS
:
printf
(
"LC_FUNCTION_STARTS"
);
break
;
#endif
default:
printf
(
"unknown "
);
...
...
@@ -1126,6 +1136,28 @@ copy_dyld_info (struct load_command *lc, long delta)
}
#endif
#ifdef LC_FUNCTION_STARTS
/* Copy a LC_FUNCTION_STARTS load command from the input file to the
output file, adjusting the data offset field. */
static
void
copy_linkedit_data
(
struct
load_command
*
lc
,
long
delta
)
{
struct
linkedit_data_command
*
ldp
=
(
struct
linkedit_data_command
*
)
lc
;
if
(
ldp
->
dataoff
>
0
)
ldp
->
dataoff
+=
delta
;
printf
(
"Writing "
);
print_load_command_name
(
lc
->
cmd
);
printf
(
" command
\n
"
);
if
(
!
unexec_write
(
curr_header_offset
,
lc
,
lc
->
cmdsize
))
unexec_error
(
"cannot write linkedit data command to header"
);
curr_header_offset
+=
lc
->
cmdsize
;
}
#endif
/* Copy other kinds of load commands from the input file to the output
file, ones that do not require adjustments of file offsets. */
static
void
...
...
@@ -1197,6 +1229,11 @@ dump_it ()
case
LC_DYLD_INFO_ONLY
:
copy_dyld_info
(
lca
[
i
],
linkedit_delta
);
break
;
#endif
#ifdef LC_FUNCTION_STARTS
case
LC_FUNCTION_STARTS
:
copy_linkedit_data
(
lca
[
i
],
linkedit_delta
);
break
;
#endif
default:
copy_other
(
lca
[
i
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment