Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
f3dd7312
Commit
f3dd7312
authored
May 27, 2012
by
Andreas Schwab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* unexmacosx.c (copy_data_segment): Truncate after 16 characters
when referring to sectname field in printf format.
parent
cd376509
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
src/ChangeLog
src/ChangeLog
+5
-0
src/unexmacosx.c
src/unexmacosx.c
+10
-9
No files found.
src/ChangeLog
View file @
f3dd7312
2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
* unexmacosx.c (copy_data_segment): Truncate after 16 characters
when referring to sectname field in printf format.
2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
* lisp.h [REL_ALLOC]: Omit duplicate prototypes.
...
...
src/unexmacosx.c
View file @
f3dd7312
...
...
@@ -809,9 +809,9 @@ copy_data_segment (struct load_command *lc)
{
sectp
->
flags
=
S_REGULAR
;
if
(
!
unexec_write
(
sectp
->
offset
,
(
void
*
)
sectp
->
addr
,
sectp
->
size
))
unexec_error
(
"cannot write section %s"
,
sectp
->
sectname
);
unexec_error
(
"cannot write section %
.16
s"
,
sectp
->
sectname
);
if
(
!
unexec_write
(
header_offset
,
sectp
,
sizeof
(
struct
section
)))
unexec_error
(
"cannot write section %s's header"
,
sectp
->
sectname
);
unexec_error
(
"cannot write section %
.16
s's header"
,
sectp
->
sectname
);
}
else
if
(
strncmp
(
sectp
->
sectname
,
SECT_BSS
,
16
)
==
0
)
{
...
...
@@ -829,15 +829,15 @@ copy_data_segment (struct load_command *lc)
my_size
=
(
unsigned
long
)
my_endbss_static
-
sectp
->
addr
;
if
(
!
(
sectp
->
addr
<=
(
unsigned
long
)
my_endbss_static
&&
my_size
<=
sectp
->
size
))
unexec_error
(
"my_endbss_static is not in section %s"
,
unexec_error
(
"my_endbss_static is not in section %
.16
s"
,
sectp
->
sectname
);
if
(
!
unexec_write
(
sectp
->
offset
,
(
void
*
)
sectp
->
addr
,
my_size
))
unexec_error
(
"cannot write section %s"
,
sectp
->
sectname
);
unexec_error
(
"cannot write section %
.16
s"
,
sectp
->
sectname
);
if
(
!
unexec_write_zero
(
sectp
->
offset
+
my_size
,
sectp
->
size
-
my_size
))
unexec_error
(
"cannot write section %s"
,
sectp
->
sectname
);
unexec_error
(
"cannot write section %
.16
s"
,
sectp
->
sectname
);
if
(
!
unexec_write
(
header_offset
,
sectp
,
sizeof
(
struct
section
)))
unexec_error
(
"cannot write section %s's header"
,
sectp
->
sectname
);
unexec_error
(
"cannot write section %
.16
s's header"
,
sectp
->
sectname
);
}
else
if
(
strncmp
(
sectp
->
sectname
,
"__la_symbol_ptr"
,
16
)
==
0
||
strncmp
(
sectp
->
sectname
,
"__nl_symbol_ptr"
,
16
)
==
0
...
...
@@ -851,12 +851,13 @@ copy_data_segment (struct load_command *lc)
||
strncmp
(
sectp
->
sectname
,
"__objc_"
,
7
)
==
0
)
{
if
(
!
unexec_copy
(
sectp
->
offset
,
old_file_offset
,
sectp
->
size
))
unexec_error
(
"cannot copy section %s"
,
sectp
->
sectname
);
unexec_error
(
"cannot copy section %
.16
s"
,
sectp
->
sectname
);
if
(
!
unexec_write
(
header_offset
,
sectp
,
sizeof
(
struct
section
)))
unexec_error
(
"cannot write section %s's header"
,
sectp
->
sectname
);
unexec_error
(
"cannot write section %
.16
s's header"
,
sectp
->
sectname
);
}
else
unexec_error
(
"unrecognized section name in __DATA segment"
);
unexec_error
(
"unrecognized section %.16s in __DATA segment"
,
sectp
->
sectname
);
printf
(
" section %-16.16s at %#8lx - %#8lx (sz: %#8lx)
\n
"
,
sectp
->
sectname
,
(
long
)
(
sectp
->
offset
),
...
...
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