Retain .debug_addr sections loaded in the main file.
[deliverable/binutils-gdb.git] / bfd / elf32-lm32.c
index 2be3b9264421ff114c76a79646e67b0b6b8b35ce..fa0b2fcfff3efbd9b1363828d94e1b371e5713d2 100644 (file)
@@ -1,5 +1,5 @@
 /* Lattice Mico32-specific support for 32-bit ELF
-   Copyright (C) 2008-2020 Free Software Foundation, Inc.
+   Copyright (C) 2008-2021 Free Software Foundation, Inc.
    Contributed by Jon Beniston <jon@beniston.com>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -67,8 +67,9 @@ struct elf_lm32_link_hash_table
 /* Get the lm32 ELF linker hash table from a link_info structure.  */
 
 #define lm32_elf_hash_table(p) \
-  (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) \
-  == LM32_ELF_DATA ? ((struct elf_lm32_link_hash_table *) ((p)->hash)) : NULL)
+  ((is_elf_hash_table ((p)->hash)                                      \
+    && elf_hash_table_id (elf_hash_table (p)) == LM32_ELF_DATA)                \
+   ? (struct elf_lm32_link_hash_table *) (p)->hash : NULL)
 
 #define lm32fdpic_got_section(info) \
   (lm32_elf_hash_table (info)->root.sgot)
This page took 0.022756 seconds and 4 git commands to generate.