aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1995-08-16 23:28:18 +0000
committerSteve Chamberlain <sac@cygnus>1995-08-16 23:28:18 +0000
commitee473c97b50fd5743d7f4d07bc3b468113e6674e (patch)
tree5c49a74517e86f1b27717d32ebcbb061b2db13ff /binutils
parenta77024ef113758e9b99999941e79ae6a495c5e56 (diff)
downloadgdb-ee473c97b50fd5743d7f4d07bc3b468113e6674e.zip
gdb-ee473c97b50fd5743d7f4d07bc3b468113e6674e.tar.gz
gdb-ee473c97b50fd5743d7f4d07bc3b468113e6674e.tar.bz2
* dlltool.c (gen_exp_file): Fix RVA handling.
(rva_s, rva_n): Delete.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/dlltool.c38
2 files changed, 22 insertions, 21 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 3ff0644..0835825 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 16 16:26:52 1995 steve chamberlain <sac@slash.cygnus.com>
+
+ * dlltool.c (gen_exp_file): Fix RVA handling.
+ (rva_s, rva_n): Delete.
+
Fri Aug 11 18:27:18 1995 Ian Lance Taylor <ian@cygnus.com>
* nm.c (main): Ignore -e.
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 32a394c..d8ac895b 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -606,19 +606,6 @@ sfunc (a, b)
}
-static char *rva_n (long addr)
-{
- char b[20];
- sprintf (b, "0x%08x - __rva");
- return strdup (b);
-}
-
-static char *rva_s (char *s)
-{
- char b[20];
- sprintf (b, "0x%08x - __rva");
- return strdup (b);
-}
static void
flush_page (f, need, page_addr, on_page)
@@ -629,9 +616,11 @@ flush_page (f, need, page_addr, on_page)
{
int i;
/* Flush this page */
- fprintf (f, "\t%s\t%s\t%s Starting RVA for chunk\n",
+ fprintf (f, "\t%s\t%s0x%08x%s\t%s Starting RVA for chunk\n",
ASM_LONG,
- rva_n(page_addr),
+ ASM_RVA_BEFORE,
+ page_addr,
+ ASM_RVA_AFTER,
ASM_C);
fprintf (f, "\t%s\t0x%x\t%s Size of block\n",
ASM_LONG,
@@ -680,7 +669,8 @@ gen_exp_file ()
fprintf (f, "\t%s 0 %s Allways 0\n", ASM_LONG, ASM_C);
fprintf (f, "\t%s %d %s Time and date\n", ASM_LONG, time (0), ASM_C);
fprintf (f, "\t%s 0 %s Major and Minor version\n", ASM_LONG, ASM_C);
- fprintf (f, "\t%s name %s Ptr to name of dll\n", ASM_LONG, ASM_C);
+ fprintf (f, "\t%s %sname%s%s Ptr to name of dll\n", ASM_LONG, ASM_RVA_BEFORE,
+ ASM_RVA_AFTER,ASM_C);
fprintf (f, "\t%s %d %s Starting ordinal of exports\n", ASM_LONG, d_ord, ASM_C);
fprintf (f, "\t%s The next field is documented as being the number of functions\n", ASM_C);
fprintf (f, "\t%s yet it doesn't look like that in real PE dlls\n", ASM_C);
@@ -688,9 +678,12 @@ gen_exp_file ()
fprintf (f, "\t%s always the number of names field\n", ASM_C);
fprintf (f, "\t%s %d %s Number of functions\n", ASM_LONG, d_nfuncs, ASM_C);
fprintf (f, "\t%s %d %s Number of names\n", ASM_LONG, d_nfuncs, ASM_C);
- fprintf (f, "\t%s afuncs %s Address of functions\n", ASM_LONG, ASM_C);
- fprintf (f, "\t%s anames %s Address of names\n", ASM_LONG, ASM_C);
- fprintf (f, "\t%s anords %s Address of ordinals\n", ASM_LONG, ASM_C);
+ fprintf (f, "\t%s %safuncs%s %s Address of functions\n", ASM_LONG,
+ ASM_RVA_BEFORE, ASM_RVA_AFTER,ASM_C);
+ fprintf (f, "\t%s %sanames%s %s Address of names\n", ASM_LONG,
+ ASM_RVA_BEFORE, ASM_RVA_AFTER,ASM_C);
+ fprintf (f, "\t%s %sanords%s %s Address of ordinals\n", ASM_LONG,
+ ASM_RVA_BEFORE, ASM_RVA_AFTER,ASM_C);
fprintf (f, "name: %s \"%s.%s\"\n", ASM_TEXT, outfile_prefix, d_suffix);
@@ -709,7 +702,8 @@ gen_exp_file ()
i = exp->ordinal;
}
#endif
- fprintf (f, "\t%s %s\t%s %d\n", ASM_LONG, exp->internal_name, ASM_C, exp->ordinal);
+ fprintf (f, "\t%s\t%s%s%s%s %d\n", ASM_LONG, ASM_RVA_BEFORE,
+ exp->internal_name,ASM_RVA_AFTER, ASM_C, exp->ordinal);
i++;
}
@@ -724,7 +718,7 @@ gen_exp_file ()
}
else
{
- fprintf (f, "\t%s n%d\n", ASM_LONG, i);
+ fprintf (f, "\t%s %sn%d%s\n", ASM_LONG, ASM_RVA_BEFORE,i,ASM_RVA_AFTER);
}
}
@@ -817,6 +811,8 @@ gen_exp_file ()
need[on_page++] = addr;
}
flush_page (f, need, page_addr, on_page);
+
+ fprintf (f, "\t%s\t0,0\t%s End\n",ASM_LONG, ASM_C);
}
fclose (f);