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
Open sidebar
emacs
emacs
Commits
cb1ee811
Commit
cb1ee811
authored
Sep 06, 1997
by
Richard M. Stallman
Browse files
Test __OpenBSD__ along with __NetBSD__.
[__OpenBSD__]: Include sys/exec_elf.h.
parent
61e63089
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/unexelf.c
src/unexelf.c
+7
-3
No files found.
src/unexelf.c
View file @
cb1ee811
...
...
@@ -420,7 +420,7 @@ Filesz Memsz Flags Align
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#if
n
def
__NetBSD__
#if
!
def
ined (
__NetBSD__
) && !defined (__OpenBSD__)
#include <elf.h>
#endif
#include <sys/mman.h>
...
...
@@ -429,7 +429,7 @@ Filesz Memsz Flags Align
#include <sym.h>
#endif
/* __sony_news && _SYSTYPE_SYSV */
#if defined (__alpha__) && !defined (__NetBSD__)
#if defined (__alpha__) && !defined (__NetBSD__)
&& !defined (__OpenBSD__)
#include <sym.h>
/* get COFF debugging symbol table declaration */
#endif
...
...
@@ -473,6 +473,10 @@ Filesz Memsz Flags Align
# endif
#endif
/* __NetBSD__ */
#ifdef __OpenBSD__
# include <sys/exec_elf.h>
#endif
#if __GNU_LIBRARY__ - 0 >= 6
# include <link.h>
/* get ElfW etc */
#endif
...
...
@@ -682,7 +686,7 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
old_bss_addr
=
OLD_SECTION_H
(
old_bss_index
).
sh_addr
;
old_bss_size
=
OLD_SECTION_H
(
old_bss_index
).
sh_size
;
#endif
/* not (__sony_news && _SYSTYPE_SYSV) */
#if defined(emacs) || !defined(DEBUG)
#if defined
(emacs) || !defined
(DEBUG)
new_bss_addr
=
(
ElfW
(
Addr
))
sbrk
(
0
);
#else
new_bss_addr
=
old_bss_addr
+
old_bss_size
+
0x1234
;
...
...
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