/* Get the LoongArch ELF linker hash table from a link_info structure. */
#define loongarch_elf_hash_table(p) \
- (elf_hash_table_id (elf_hash_table (p)) == LARCH_ELF_DATA \
- ? ((struct loongarch_elf_link_hash_table *) ((p)->hash)) \
- : NULL)
+ ((struct loongarch_elf_link_hash_table *) ((p)->hash)) \
#define MINUS_ONE ((bfd_vma) 0 - 1)
ldelf_map_segments (need_layout);
}
-/* This is a convenient point to tell BFD about target specific flags.
- After the output has been created, but before inputs are read. */
-
-static void
-larch_create_output_section_statements (void)
-{
- /* See PR 22920 for an example of why this is necessary. */
- if (strstr (bfd_get_target (link_info.output_bfd), "loong") == NULL)
- {
- einfo (_("%F%P: error: cannot change output format"
- " whilst linking %s binaries\n"), "LoongArch");
- return;
- }
-}
-
EOF
LDEMUL_BEFORE_ALLOCATION=larch_elf_before_allocation
LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation
-LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=larch_create_output_section_statements