summaryrefslogtreecommitdiff
path: root/src/unexaix.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-10 07:49:12 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-10 07:49:12 +0000
commit7904e6e0c60d13050c87266222ec80a7211ac3e5 (patch)
treeb581bd36110da21bf66e256d046a3921dc9aa19b /src/unexaix.c
parent6056c55b046a50729abe5381f01b667728c49c11 (diff)
downloademacs-7904e6e0c60d13050c87266222ec80a7211ac3e5.tar.gz
(unrelocate_symbols): Add AIX4_1 conditionals and code.
Diffstat (limited to 'src/unexaix.c')
-rw-r--r--src/unexaix.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/unexaix.c b/src/unexaix.c
index 960c730f0f2..14bf0753928 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -834,7 +834,11 @@ unrelocate_symbols (new, a_out, a_name, new_name)
{
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 @@ unrelocate_symbols (new, a_out, a_name, new_name)
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);