- Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2001, 2002
+ Free Software Foundation, Inc.
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#define MY(OP) CAT(i386linux_,OP)
+
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (i386linux_,OP)
/* We always generate QMAGIC files in preference to ZMAGIC files. It
would be possible to make this a linker option, if that ever
becomes important. */
static void MY_final_link_callback
PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *));
/* We always generate QMAGIC files in preference to ZMAGIC files. It
would be possible to make this a linker option, if that ever
becomes important. */
static void MY_final_link_callback
PARAMS ((bfd *, file_ptr *, file_ptr *, file_ptr *));
if (! NAME(aout,link_hash_table_init) (&ret->root, abfd,
linux_link_hash_newfunc))
{
if (! NAME(aout,link_hash_table_init) (&ret->root, abfd,
linux_link_hash_newfunc))
{
if (! (_bfd_generic_link_add_one_symbol
(info, linux_hash_table (info)->dynobj, SHARABLE_CONFLICTS,
if (! (_bfd_generic_link_add_one_symbol
(info, linux_hash_table (info)->dynobj, SHARABLE_CONFLICTS,
- BSF_GLOBAL | BSF_CONSTRUCTOR, s, 0, NULL, false, false, NULL)))
+ BSF_GLOBAL | BSF_CONSTRUCTOR, s, (bfd_vma) 0, NULL,
+ false, false, NULL)))
if (h->root.root.type == bfd_link_hash_undefined
&& strncmp (h->root.root.root.string, NEEDS_SHRLIB,
sizeof NEEDS_SHRLIB - 1) == 0)
if (h->root.root.type == bfd_link_hash_undefined
&& strncmp (h->root.root.root.string, NEEDS_SHRLIB,
sizeof NEEDS_SHRLIB - 1) == 0)
+ sizeof PLT_REF_PREFIX - 1),
false, false, true);
/* h2 does not follow indirect symbols. */
+ sizeof PLT_REF_PREFIX - 1),
false, false, true);
/* h2 does not follow indirect symbols. */
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
false, false, false);
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
false, false, false);
/* First find the fixups... */
linux_link_hash_traverse (linux_hash_table (info),
linux_tally_symbols,
/* First find the fixups... */
linux_link_hash_traverse (linux_hash_table (info),
linux_tally_symbols,
- s->_raw_size = 8 + linux_hash_table (info)->fixup_count * 8;
- s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
+ s->_raw_size = linux_hash_table (info)->fixup_count + 1;
+ s->_raw_size *= 8;
+ s->contents = (bfd_byte *) bfd_zalloc (output_bfd, s->_raw_size);
os->filepos + s->output_offset,
os->vma + s->output_offset);
#endif
fixup_table = s->contents;
os->filepos + s->output_offset,
os->vma + s->output_offset);
#endif
fixup_table = s->contents;
- bfd_put_32 (output_bfd, linux_hash_table (info)->fixup_count, fixup_table);
+ bfd_put_32 (output_bfd,
+ (bfd_vma) linux_hash_table (info)->fixup_count, fixup_table);
- /* FIXME! */
- fprintf (stderr,
- "Symbol %s not defined for fixups\n",
- f->h->root.root.root.string);
+ (*_bfd_error_handler)
+ (_("Symbol %s not defined for fixups\n"),
+ f->h->root.root.root.string);
- new_addr = new_addr - (f->value + 5);
- bfd_put_32 (output_bfd, new_addr, fixup_table);
+ new_addr = new_addr - (f->value + 5);
+ bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
if (linux_hash_table (info)->local_builtins != 0)
{
/* Special marker so we know to switch to the other type of fixup */
if (linux_hash_table (info)->local_builtins != 0)
{
/* Special marker so we know to switch to the other type of fixup */
- /* FIXME! */
- fprintf (stderr,
- "Symbol %s not defined for fixups\n",
- f->h->root.root.root.string);
+ (*_bfd_error_handler)
+ (_("Symbol %s not defined for fixups\n"),
+ f->h->root.root.root.string);
- if (bfd_write ((PTR) s->contents, 1, s->_raw_size, output_bfd)
- != s->_raw_size)
+ if (bfd_bwrite ((PTR) s->contents, s->_raw_size, output_bfd) != s->_raw_size)