[binutils-gdb] lm32: duplicate create_got_section

Alan Modra via Binutils-cvs <[email protected]>
Newsgroups gmane.comp.gnu.binutils.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=367e9db291f9b9158cd28695b080785fbabbbff0

commit 367e9db291f9b9158cd28695b080785fbabbbff0
Author: Alan Modra <[email protected]>
Date:   Mon May 11 09:18:57 2026 +0930

    lm32: duplicate create_got_section
    
    lm32_elf_create_dynamic_sections has two calls to
    _bfd_elf_create_got_section.  That doesn't cause a problem, but one
    such call suffices.
    
            * elf32-lm32.c (lm32_elf_create_dynamic_sections): Remove
            one _bfd_elf_create_got_section call.

Diff:
---
 bfd/elf32-lm32.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index 80846326b04..ffb0e104be9 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -2208,10 +2208,6 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
   if (htab == NULL)
     return false;
 
-  /* Make sure we have a GOT - For the case where we have a dynamic object
-     but none of the relocs in check_relocs */
-  if (!_bfd_elf_create_got_section (abfd, info))
-    return false;
   if (IS_FDPIC (abfd) && (htab->sfixup32 == NULL))
     {
       if (! create_rofixup_section (abfd, info))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.