This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Fixes to LD for all-targets build
- To: binutils at sourceware dot cygnus dot com
- Subject: Fixes to LD for all-targets build
- From: Nick Clifton <nickc at cygnus dot com>
- Date: Wed, 1 Mar 2000 12:45:31 -0800
Hi Guys,
I am about to check in the following patches to fix building LD
with --enable-targets=all.
Cheers
Nick
2000-03-01 H.J. Lu <hjl@gnu.org>
* emulparams/mipspe.sh: Add SUBSYSTEM and INITIAL_SYMBOL_CHAR.
* emulparams/shpe.sh: Likewise.
Index: emulparams/mipspe.sh
===================================================================
RCS file: /work/cvs/gnu/binutils/ld/emulparams/mipspe.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -p -r1.1.1.1 -r1.2
--- emulparams/mipspe.sh 2000/02/24 19:12:25 1.1.1.1
+++ emulparams/mipspe.sh 2000/03/01 16:25:42 1.2
@@ -4,3 +4,5 @@ OUTPUT_FORMAT="pei-mips"
OUTPUT_ARCH="mips"
RELOCATEABLE_OUTPUT_FORMAT="ecoff-littlemips"
TEMPLATE_NAME=pe
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
Index: emulparams/shpe.sh
===================================================================
RCS file: /work/cvs/gnu/binutils/ld/emulparams/shpe.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -p -r1.1.1.1 -r1.2
--- emulparams/shpe.sh 2000/02/24 19:12:25 1.1.1.1
+++ emulparams/shpe.sh 2000/03/01 16:25:42 1.2
@@ -2,3 +2,5 @@ ARCH=sh
SCRIPT_NAME=pe
OUTPUT_FORMAT="pei-shl"
TEMPLATE_NAME=pe
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
2000-03-01 Nick Clifton <nickc@cygnus.com>
* pe-dll.c: Remove unused variables and add ATTRIBUTE_UNUSED
to unused parameters.
* emultempl/pe.em: Add "#ifdef DLL_SUPPORT" around static
functions only used by DLL code.
(_place_orphan): Initialise 'dollar'.
Index: pe-dll.c
===================================================================
RCS file: /cvs/src//src/ld/pe-dll.c,v
retrieving revision 1.9
diff -p -r1.9 pe-dll.c
*** pe-dll.c 2000/02/24 17:53:11 1.9
--- pe-dll.c 2000/03/01 20:39:56
*************** generate_edata (abfd, info)
*** 617,631 ****
static void
fill_exported_offsets (abfd, info)
! bfd *abfd;
struct bfd_link_info *info;
{
! int i, j;
struct bfd_link_hash_entry *blhe;
! bfd *b;
! struct sec *s;
! def_file_export *e=0;
!
for (i = 0; i < pe_def_file->num_exports; i++)
{
char *name = (char *) xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
--- 617,628 ----
static void
fill_exported_offsets (abfd, info)
! bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
! int i;
struct bfd_link_hash_entry *blhe;
!
for (i = 0; i < pe_def_file->num_exports; i++)
{
char *name = (char *) xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
*************** make_one (exp, parent)
*** 1402,1413 ****
bfd *parent;
{
asection *tx, *id7, *id5, *id4, *id6;
! unsigned char *td, *d7, *d5, *d4, *d6;
int len;
char *oname;
bfd *abfd;
! unsigned char *jmp_bytes;
! int jmp_byte_count;
switch (pe_details->pe_arch)
{
--- 1399,1410 ----
bfd *parent;
{
asection *tx, *id7, *id5, *id4, *id6;
! unsigned char *td, *d7, *d5, *d4, *d6 = NULL;
int len;
char *oname;
bfd *abfd;
! unsigned char *jmp_bytes = NULL;
! int jmp_byte_count = 0;
switch (pe_details->pe_arch)
{
Index: emultempl/pe.em
===================================================================
RCS file: /cvs/src//src/ld/emultempl/pe.em,v
retrieving revision 1.19
diff -p -r1.19 pe.em
*** pe.em 2000/02/24 17:53:11 1.19
--- pe.em 2000/03/01 20:39:56
*************** static int support_old_code = 0;
*** 114,122 ****
static char * thumb_entry_symbol = NULL;
static lang_assignment_statement_type *image_base_statement = 0;
- static char *pe_out_def_filename = 0;
static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
static char *pe_implib_filename = 0;
extern const char *output_filename;
--- 114,124 ----
static char * thumb_entry_symbol = NULL;
static lang_assignment_statement_type *image_base_statement = 0;
static int pe_enable_stdcall_fixup = -1; /* 0=disable 1=enable */
+ #ifdef DLL_SUPPORT
+ static char *pe_out_def_filename = 0;
static char *pe_implib_filename = 0;
+ #endif
extern const char *output_filename;
*************** pe_undef_cdecl_match (h, string)
*** 642,647 ****
--- 644,650 ----
return true;
}
+ #ifdef DLL_SUPPORT
static void
pe_fixup_stdcalls ()
{
*************** pe_fixup_stdcalls ()
*** 706,711 ****
--- 709,715 ----
}
}
}
+ #endif /* DLL_SUPPORT */
static void
gld_${EMULATION_NAME}_after_open ()
*************** gld_${EMULATION_NAME}_after_open ()
*** 757,763 ****
#endif
{
! int is_ms_arch;
bfd *cur_arch = 0;
lang_input_statement_type *is2;
--- 761,767 ----
#endif
{
! int is_ms_arch = 0;
bfd *cur_arch = 0;
lang_input_statement_type *is2;
*************** gld_${EMULATION_NAME}_before_allocation(
*** 869,875 ****
/* This is called when an input file isn't recognized as a BFD. We
check here for .DEF files and pull them in automatically. */
!
static int
saw_option(char *option)
{
--- 873,879 ----
/* This is called when an input file isn't recognized as a BFD. We
check here for .DEF files and pull them in automatically. */
! #ifdef DLL_SUPPORT
static int
saw_option(char *option)
{
*************** saw_option(char *option)
*** 879,888 ****
return init[i].inited;
return 0;
}
static boolean
gld_${EMULATION_NAME}_unrecognized_file(entry)
! lang_input_statement_type *entry;
{
#ifdef DLL_SUPPORT
const char *ext = entry->filename + strlen (entry->filename) - 4;
--- 883,897 ----
return init[i].inited;
return 0;
}
+ #endif
static boolean
gld_${EMULATION_NAME}_unrecognized_file(entry)
! lang_input_statement_type *entry
! #ifndef DLL_SUPPORT
! ATTRIBUTE_UNUSED
! #endif
! ;
{
#ifdef DLL_SUPPORT
const char *ext = entry->filename + strlen (entry->filename) - 4;
*************** gld_${EMULATION_NAME}_unrecognized_file(
*** 967,973 ****
static boolean
gld_${EMULATION_NAME}_recognized_file(entry)
! lang_input_statement_type *entry;
{
#ifdef DLL_SUPPORT
#ifdef TARGET_IS_i386pe
--- 976,986 ----
static boolean
gld_${EMULATION_NAME}_recognized_file(entry)
! lang_input_statement_type *entry
! #ifndef DLL_SUPPORT
! ATTRIBUTE_UNUSED
! #endif
! ;
{
#ifdef DLL_SUPPORT
#ifdef TARGET_IS_i386pe
*************** gld_${EMULATION_NAME}_place_orphan (file
*** 1087,1093 ****
asection *s;
{
const char *secname;
! char *dollar;
if ((s->flags & SEC_ALLOC) == 0)
return false;
--- 1100,1106 ----
asection *s;
{
const char *secname;
! char *dollar = NULL;
if ((s->flags & SEC_ALLOC) == 0)
return false;