HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(x_iconify_frame): If frame is invisible, explicitly mark it as iconified.
[bpt/emacs.git]
/
src
/
unexsunos4.c
diff --git
a/src/unexsunos4.c
b/src/unexsunos4.c
index
e36ddee
..
bdc2033
100644
(file)
--- a/
src/unexsunos4.c
+++ b/
src/unexsunos4.c
@@
-15,7
+15,8
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
/* Contributed by Viktor Dukhovni. */
/*
/* Contributed by Viktor Dukhovni. */
/*
@@
-56,7
+57,7
@@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <config.h>
#endif
#include <config.h>
#endif
-#if defined (SUNOS4) || defined (__FreeBSD__)
+#if defined (SUNOS4) || defined (__FreeBSD__)
|| defined (__NetBSD__)
#define UNDO_RELOCATION
#endif
#define UNDO_RELOCATION
#endif
@@
-215,10
+216,14
@@
unexec (new_name, a_name, bndry, bss_start, entry)
unsigned long daddr = N_DATADDR (ohdr);
unsigned long rel, erel;
#ifdef SUNOS4
unsigned long daddr = N_DATADDR (ohdr);
unsigned long rel, erel;
#ifdef SUNOS4
+#ifdef SUNOS4_SHARED_LIBRARIES
extern struct link_dynamic _DYNAMIC;
/* SunOS4.x's ld_rel is relative to N_TXTADDR. */
extern struct link_dynamic _DYNAMIC;
/* SunOS4.x's ld_rel is relative to N_TXTADDR. */
- if (_DYNAMIC.ld_version < 2)
+ if (!ohdr.a_dynamic)
+ /* This was statically linked. */
+ rel = erel = 0;
+ else if (_DYNAMIC.ld_version < 2)
{
rel = _DYNAMIC.ld_un.ld_1->ld_rel + N_TXTADDR (ohdr);
erel = _DYNAMIC.ld_un.ld_1->ld_hash + N_TXTADDR (ohdr);
{
rel = _DYNAMIC.ld_un.ld_1->ld_rel + N_TXTADDR (ohdr);
erel = _DYNAMIC.ld_un.ld_1->ld_hash + N_TXTADDR (ohdr);
@@
-228,6
+233,9
@@
unexec (new_name, a_name, bndry, bss_start, entry)
rel = _DYNAMIC.ld_un.ld_2->ld_rel + N_TXTADDR (ohdr);
erel = _DYNAMIC.ld_un.ld_2->ld_hash + N_TXTADDR (ohdr);
}
rel = _DYNAMIC.ld_un.ld_2->ld_rel + N_TXTADDR (ohdr);
erel = _DYNAMIC.ld_un.ld_2->ld_hash + N_TXTADDR (ohdr);
}
+#else /* not SUNOS4_SHARED_LIBRARIES */
+ rel = erel = 0;
+#endif /* not SUNOS4_SHARED_LIBRARIES */
#ifdef sparc
#define REL_INFO_TYPE struct reloc_info_sparc
#else
#ifdef sparc
#define REL_INFO_TYPE struct reloc_info_sparc
#else
@@
-235,7
+243,7
@@
unexec (new_name, a_name, bndry, bss_start, entry)
#endif /* sparc */
#define REL_TARGET_ADDRESS(r) (((REL_INFO_TYPE *)(r))->r_address)
#endif /* SUNOS4 */
#endif /* sparc */
#define REL_TARGET_ADDRESS(r) (((REL_INFO_TYPE *)(r))->r_address)
#endif /* SUNOS4 */
-#if
def __FreeBSD__
+#if
defined (__FreeBSD__) || defined (__NetBSD__)
extern struct _dynamic _DYNAMIC;
/* FreeBSD's LD_REL is a virtual address itself. */
extern struct _dynamic _DYNAMIC;
/* FreeBSD's LD_REL is a virtual address itself. */