X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=bfd%2Felf64-tilegx.c;h=aae2b098f0fc846c9f881cde7eb98e3306142f35;hb=243cf0f69c36c4ee09c3c2b0bc7a97dc16119c51;hp=e30ca8094861db759ad9fea1fb8dab58d2c42955;hpb=aa137e4d51ba6638b2714f8b3856d8abfd0bf143;p=binutils-gdb.git diff --git a/bfd/elf64-tilegx.c b/bfd/elf64-tilegx.c index e30ca809486..aae2b098f0f 100644 --- a/bfd/elf64-tilegx.c +++ b/bfd/elf64-tilegx.c @@ -1,5 +1,5 @@ /* TILE-Gx-specific support for 64-bit ELF. - Copyright 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -28,21 +28,21 @@ /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; size_t size; if (note->descsz != TILEGX_PRSTATUS_SIZEOF) - return FALSE; + return false; /* pr_cursig */ - elf_tdata (abfd)->core_signal = + elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + TILEGX_PRSTATUS_OFFSET_PR_CURSIG); /* pr_pid */ - elf_tdata (abfd)->core_pid = + elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + TILEGX_PRSTATUS_OFFSET_PR_PID); /* pr_reg */ @@ -54,15 +54,15 @@ tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz != TILEGX_PRPSINFO_SIZEOF) - return FALSE; + return false; - elf_tdata (abfd)->core_program + elf_tdata (abfd)->core->program = _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_FNAME, 16); - elf_tdata (abfd)->core_command + elf_tdata (abfd)->core->command = _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_PSARGS, ELF_PR_PSARGS_SIZE); @@ -70,14 +70,14 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) onto the end of the args in some (at least one anyway) implementations, so strip it off if it exists. */ { - char *command = elf_tdata (abfd)->core_command; + char *command = elf_tdata (abfd)->core->command; int n = strlen (command); if (0 < n && command[n - 1] == ' ') command[n - 1] = '\0'; } - return TRUE; + return true; } @@ -87,12 +87,15 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) #define ELF_MAXPAGESIZE 0x10000 #define ELF_COMMONPAGESIZE 0x10000 -#define TARGET_LITTLE_SYM bfd_elf64_tilegx_vec -#define TARGET_LITTLE_NAME "elf64-tilegx" + +#define TARGET_BIG_SYM tilegx_elf64_be_vec +#define TARGET_BIG_NAME "elf64-tilegx-be" +#define TARGET_LITTLE_SYM tilegx_elf64_le_vec +#define TARGET_LITTLE_NAME "elf64-tilegx-le" #define elf_backend_reloc_type_class tilegx_reloc_type_class -#define bfd_elf64_bfd_reloc_name_lookup tilegx_reloc_name_lookup +#define bfd_elf64_bfd_reloc_name_lookup tilegx_reloc_name_lookup #define bfd_elf64_bfd_link_hash_table_create tilegx_elf_link_hash_table_create #define bfd_elf64_bfd_reloc_type_lookup tilegx_reloc_type_lookup #define bfd_elf64_bfd_merge_private_bfd_data \ @@ -108,12 +111,11 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) #define elf_backend_finish_dynamic_symbol tilegx_elf_finish_dynamic_symbol #define elf_backend_finish_dynamic_sections tilegx_elf_finish_dynamic_sections #define elf_backend_gc_mark_hook tilegx_elf_gc_mark_hook -#define elf_backend_gc_sweep_hook tilegx_elf_gc_sweep_hook #define elf_backend_plt_sym_val tilegx_elf_plt_sym_val -#define elf_info_to_howto_rel NULL -#define elf_info_to_howto tilegx_info_to_howto_rela -#define elf_backend_grok_prstatus tilegx_elf_grok_prstatus -#define elf_backend_grok_psinfo tilegx_elf_grok_psinfo +#define elf_info_to_howto_rel NULL +#define elf_info_to_howto tilegx_info_to_howto_rela +#define elf_backend_grok_prstatus tilegx_elf_grok_prstatus +#define elf_backend_grok_psinfo tilegx_elf_grok_psinfo #define elf_backend_additional_program_headers tilegx_additional_program_headers #define elf_backend_init_index_section _bfd_elf_init_1_index_section @@ -126,6 +128,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) #define elf_backend_plt_alignment 6 #define elf_backend_want_plt_sym 1 #define elf_backend_got_header_size 8 +#define elf_backend_want_dynrelro 1 #define elf_backend_rela_normal 1 #define elf_backend_default_execstack 0