changeset 10139:f9b79337418b

(unrelocate_symbols): Add AIX4_1 conditionals and code.
author Richard M. Stallman <rms@gnu.org>
date Sat, 10 Dec 1994 07:49:12 +0000
parents 2a0a17f1043e
children 842f6dc76fc6
files src/unexaix.c
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/unexaix.c	Sat Dec 10 07:47:21 1994 +0000
+++ b/src/unexaix.c	Sat Dec 10 07:49:12 1994 +0000
@@ -834,7 +834,11 @@
 	{
 	  int orig_int;
 
+#ifdef AIX4_1
+	  lseek (a_out, orig_data_scnptr + (ldrel->l_vaddr - d_start), 0);
+#else
 	  lseek (a_out, orig_data_scnptr + ldrel->l_vaddr, 0);
+#endif
 
 	  if (read (a_out, (void *) &orig_int, sizeof (orig_int)) != sizeof (orig_int))
 	    {
@@ -843,18 +847,32 @@
 
 	  switch (ldrel->l_symndx) {
 	  case SYMNDX_TEXT:
+#ifdef AIX4_1
+	    p = (int *) (ldrel->l_vaddr);
+	    orig_int = * p;
+#else
 	    p = (int *) (d_start + ldrel->l_vaddr);
 	    orig_int = * p - (t_start - f_ohdr.text_start);
+#endif
 	    break;
 
 	  case SYMNDX_DATA:
 	  case SYMNDX_BSS:
+#ifdef AIX4_1
+	    p = (int *) (ldrel->l_vaddr);
+	    orig_int = * p;
+#else
 	    p = (int *) (d_start + ldrel->l_vaddr);
 	    orig_int = * p - (d_start - f_ohdr.data_start);
+#endif
 	    break;
 	  }
 
+#ifdef AIX4_1
+	  lseek (new, data_scnptr + (ldrel->l_vaddr - d_start), 0);
+#else
 	  lseek (new, data_scnptr + ldrel->l_vaddr, 0);
+#endif
 	  if (write (new, (void *) &orig_int, sizeof (orig_int)) != sizeof (orig_int))
 	    {
 	      PERROR (new_name);