- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_pcrel24:
- case R_pcrel24_jump_l:
- picrel->call--;
- break;
-
- case R_BFIN_FUNCDESC_VALUE:
- picrel->relocsfdv--;
- if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
- picrel->relocs32++;
- /* Fall through. */
-
- case R_byte4_data:
- picrel->sym--;
- if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
- picrel->relocs32--;
- break;
-
- case R_BFIN_GOT17M4:
- picrel->got17m4--;
- break;
-
- case R_BFIN_GOTHI:
- case R_BFIN_GOTLO:
- picrel->gothilo--;
- break;
-
- case R_BFIN_FUNCDESC_GOT17M4:
- picrel->fdgot17m4--;
- break;
-
- case R_BFIN_FUNCDESC_GOTHI:
- case R_BFIN_FUNCDESC_GOTLO:
- picrel->fdgothilo--;
- break;
-
- case R_BFIN_GOTOFF17M4:
- case R_BFIN_GOTOFFHI:
- case R_BFIN_GOTOFFLO:
- picrel->gotoff--;
- break;
-
- case R_BFIN_FUNCDESC_GOTOFF17M4:
- picrel->fdgoff17m4--;
- break;
-
- case R_BFIN_FUNCDESC_GOTOFFHI:
- case R_BFIN_FUNCDESC_GOTOFFLO:
- picrel->fdgoffhilo--;
- break;
-
- case R_BFIN_FUNCDESC:
- picrel->fd--;
- picrel->relocsfd--;
- break;
-
- default:
- break;
- }
- }
-
- return TRUE;
-}
-
-/* We need dynamic symbols for every section, since segments can
- relocate independently. */
-static bfd_boolean
-_bfinfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info
- ATTRIBUTE_UNUSED,
- asection *p ATTRIBUTE_UNUSED)
-{
- switch (elf_section_data (p)->this_hdr.sh_type)
- {
- case SHT_PROGBITS:
- case SHT_NOBITS:
- /* If sh_type is yet undecided, assume it could be
- SHT_PROGBITS/SHT_NOBITS. */
- case SHT_NULL:
- return FALSE;
-
- /* There shouldn't be section relative relocations
- against any other section. */
- default:
- return TRUE;
- }
-}
-
-/* Create a .got section, as well as its additional info field. This
- is almost entirely copied from
- elflink.c:_bfd_elf_create_got_section(). */
-
-static bfd_boolean
-_bfin_create_got_section (bfd *abfd, struct bfd_link_info *info)
-{
- flagword flags, pltflags;
- asection *s;
- struct elf_link_hash_entry *h;
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- int ptralign;
- int offset;
-
- /* This function may be called more than once. */
- s = bfd_get_section_by_name (abfd, ".got");
- if (s != NULL && (s->flags & SEC_LINKER_CREATED) != 0)
- return TRUE;
-
- /* Machine specific: although pointers are 32-bits wide, we want the
- GOT to be aligned to a 64-bit boundary, such that function
- descriptors in it can be accessed with 64-bit loads and
- stores. */
- ptralign = 3;
-
- flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_LINKER_CREATED);
- pltflags = flags;
-
- s = bfd_make_section_with_flags (abfd, ".got", flags);