#define ARCH_SIZE 0
#include "elf-bfd.h"
-boolean
+bfd_boolean
_bfd_elf_create_got_section (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
/* This function may be called more than once. */
if (bfd_get_section_by_name (abfd, ".got") != NULL)
- return true;
+ return TRUE;
switch (bed->s->arch_size)
{
default:
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
if (s == NULL
|| !bfd_set_section_flags (abfd, s, flags)
|| !bfd_set_section_alignment (abfd, s, ptralign))
- return false;
+ return FALSE;
if (bed->want_got_plt)
{
if (s == NULL
|| !bfd_set_section_flags (abfd, s, flags)
|| !bfd_set_section_alignment (abfd, s, ptralign))
- return false;
+ return FALSE;
}
if (bed->want_got_sym)
bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
- bed->got_symbol_offset, (const char *) NULL, false,
+ bed->got_symbol_offset, (const char *) NULL, FALSE,
bed->collect, &bh)))
- return false;
+ return FALSE;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
if (info->shared
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
- return false;
+ return FALSE;
elf_hash_table (info)->hgot = h;
}
/* The first bit of the global offset table is the header. */
s->_raw_size += bed->got_header_size + bed->got_symbol_offset;
- return true;
+ return TRUE;
}
\f
/* Create dynamic sections when linking against a dynamic object. */
-boolean
+bfd_boolean
_bfd_elf_create_dynamic_sections (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
default:
bfd_set_error (bfd_error_bad_value);
- return false;
+ return FALSE;
}
/* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, pltflags)
|| ! bfd_set_section_alignment (abfd, s, bed->plt_alignment))
- return false;
+ return FALSE;
if (bed->want_plt_sym)
{
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
- (bfd_vma) 0, (const char *) NULL, false,
+ (bfd_vma) 0, (const char *) NULL, FALSE,
get_elf_backend_data (abfd)->collect, &bh)))
- return false;
+ return FALSE;
h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
if (info->shared
&& ! _bfd_elf_link_record_dynamic_symbol (info, h))
- return false;
+ return FALSE;
}
s = bfd_make_section (abfd,
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, ptralign))
- return false;
+ return FALSE;
if (! _bfd_elf_create_got_section (abfd, info))
- return false;
+ return FALSE;
if (bed->want_dynbss)
{
s = bfd_make_section (abfd, ".dynbss");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
- return false;
+ return FALSE;
/* The .rel[a].bss section holds copy relocs. This section is not
normally needed. We need to create it here, though, so that the
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, ptralign))
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
\f
/* Record a new dynamic symbol. We record the dynamic symbols as we
symbol should be in the dynamic symbol table, but only if there is
one. */
-boolean
+bfd_boolean
_bfd_elf_link_record_dynamic_symbol (info, h)
struct bfd_link_info *info;
struct elf_link_hash_entry *h;
struct elf_strtab_hash *dynstr;
char *p, *alc;
const char *name;
- boolean copy;
+ bfd_boolean copy;
bfd_size_type indx;
/* XXX: The ABI draft says the linker must turn hidden and
&& h->root.type != bfd_link_hash_undefweak)
{
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- return true;
+ return TRUE;
}
default:
/* Create a strtab to hold the dynamic symbol names. */
elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init ();
if (dynstr == NULL)
- return false;
+ return FALSE;
}
/* We don't put any version information in the dynamic string
if (p == NULL)
{
alc = NULL;
- copy = false;
+ copy = FALSE;
}
else
{
alc = bfd_malloc ((bfd_size_type) len);
if (alc == NULL)
- return false;
+ return FALSE;
memcpy (alc, name, len - 1);
alc[len - 1] = '\0';
name = alc;
- copy = true;
+ copy = TRUE;
}
indx = _bfd_elf_strtab_add (dynstr, name, copy);
free (alc);
if (indx == (bfd_size_type) -1)
- return false;
+ return FALSE;
h->dynstr_index = indx;
}
- return true;
+ return TRUE;
}
/* Record a new local dynamic symbol. Returns 0 on failure, 1 on
return 0;
}
- dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
+ dynstr_index = _bfd_elf_strtab_add (dynstr, name, FALSE);
if (dynstr_index == (unsigned long) -1)
return 0;
entry->isym.st_name = dynstr_index;
them are removed because they are marked as local. This is called
via elf_link_hash_traverse. */
-static boolean elf_link_renumber_hash_table_dynsyms
+static bfd_boolean elf_link_renumber_hash_table_dynsyms
PARAMS ((struct elf_link_hash_entry *, PTR));
-static boolean
+static bfd_boolean
elf_link_renumber_hash_table_dynsyms (h, data)
struct elf_link_hash_entry *h;
PTR data;
if (h->dynindx != -1)
h->dynindx = ++(*count);
- return true;
+ return TRUE;
}
/* Assign dynsym indices. In a shared library we generate a section
*lsect = *defaults;
elf_linker_section (dynobj, which) = lsect;
lsect->which = which;
- lsect->hole_written_p = false;
+ lsect->hole_written_p = FALSE;
/* See if the sections already exist */
lsect->section = s = bfd_get_section_by_name (dynobj, lsect->name);
lsect->name);
#endif
bh = bfd_link_hash_lookup (info->hash, lsect->sym_name,
- false, false, false);
+ FALSE, FALSE, FALSE);
if ((bh == NULL || bh->type == bfd_link_hash_undefined)
&& !(_bfd_generic_link_add_one_symbol
(lsect->hole_size
? s->_raw_size - lsect->hole_size + lsect->sym_offset
: lsect->sym_offset),
- (const char *) NULL, false,
+ (const char *) NULL, FALSE,
get_elf_backend_data (abfd)->collect, &bh)))
return (elf_linker_section_t *) 0;
h = (struct elf_link_hash_entry *) bh;
\f
/* Make the .rela section corresponding to the generated linker section. */
-boolean
+bfd_boolean
_bfd_elf_make_linker_section_rela (dynobj, lsect, alignment)
bfd *dynobj;
elf_linker_section_t *lsect;
int alignment;
{
if (lsect->rel_section)
- return true;
+ return TRUE;
lsect->rel_section = bfd_get_section_by_name (dynobj, lsect->rel_name);
if (lsect->rel_section == NULL)
| SEC_LINKER_CREATED
| SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, lsect->rel_section, alignment))
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}