aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1996-01-05 22:09:43 +0000
committerSteve Chamberlain <sac@cygnus>1996-01-05 22:09:43 +0000
commitd42799374f405007da9e7d9e42e34d8d28dac63f (patch)
tree08b25a620d69eb2a89f366fed33fa7bba9bbca8a /ld
parent127841e484b8850f91a36b85f11d29b5eafbe512 (diff)
downloadfsf-binutils-gdb-d42799374f405007da9e7d9e42e34d8d28dac63f.zip
fsf-binutils-gdb-d42799374f405007da9e7d9e42e34d8d28dac63f.tar.gz
fsf-binutils-gdb-d42799374f405007da9e7d9e42e34d8d28dac63f.tar.bz2
* emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation):
sort using right pointer.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog11
-rw-r--r--ld/emultempl/pe.em21
2 files changed, 30 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3e30e9a..7072300 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jan 5 14:07:45 1996 Steve Chamberlain <sac@slash.cygnus.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation):
+ sort using right pointer.
+
Fri Jan 5 12:25:47 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* scripttempl/elfppc.sc: Remove support for creating special
@@ -68,6 +73,12 @@ Wed Dec 6 14:59:06 1995 Ian Lance Taylor <ian@cygnus.com>
* ldexp.c (exp_fold_tree): Permit assignments to dot in the final
phase if the current section is abs_output_section.
+
+Tue Dec 5 09:49:39 1995 Doug Evans <dje@canuck.cygnus.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_before_allocation): Fix call
+ to sort_sections.
+
Fri Dec 1 16:48:36 1995 Ian Lance Taylor <ian@cygnus.com>
* ldgram.y (PHDRS): New token.
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 4fa9fad..40030a7 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -44,6 +44,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coff/internal.h"
#include "../bfd/libcoff.h"
+#define TARGET_IS_${EMULATION_NAME}
+
static void gld_${EMULATION_NAME}_before_parse PARAMS ((void));
static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *isfile));
@@ -253,7 +255,7 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
return 0;
case OPTION_BASE_FILE:
- link_info.base_file = (PTR) fopen (optarg,"w");
+ link_info.base_file = (PTR) fopen (optarg, FOPEN_WB);
if (link_info.base_file == NULL)
{
fprintf (stderr, "%s: Can't open base file %s\n",
@@ -319,9 +321,10 @@ gld_${EMULATION_NAME}_set_symbols()
? NT_DLL_IMAGE_BASE : NT_EXE_IMAGE_BASE;
/* Glue the assignments into the abs section */
- save=stat_ptr;
+ save = stat_ptr;
stat_ptr = &(abs_output_section->children);
+
for (j = 0; init[j].ptr; j++)
{
long val = init[j].value;
@@ -444,6 +447,20 @@ static void
gld_${EMULATION_NAME}_before_allocation()
{
extern lang_statement_list_type *stat_ptr;
+
+#ifdef TARGET_IS_ppcpe
+ /* Here we rummage through the found bfds to collect toc information */
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ ppc_process_before_allocation(is->the_bfd, &link_info);
+ }
+ }
+
+ /* We have seen it all. Allocate it, and carry on */
+ ppc_allocate_toc_section (&link_info);
+#endif
+
sort_sections (*stat_ptr);
}