[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/23932] integer overflow causes an endless loop

From: green at moxielogic dot com
Subject: [Bug binutils/23932] integer overflow causes an endless loop
Date: Tue, 04 Feb 2020 01:54:18 +0000


Anthony Green <green at moxielogic dot com> changed:

           What    |Removed                     |Added
                 CC|                            |green at moxielogic dot com

--- Comment #3 from Anthony Green <green at moxielogic dot com> ---
Hey Nick,

  This introduced a regression for me with moxie-elf-objcopy.

  To reproduce, I feed the assembler this:

        .section .text
        .global _start
        ldi.l   $r0, 0xab6789ab
        sta.l   0x0c0ffee0, $r0
        sta.b   0xdead, $r0

  ...like so

$ moxie-elf-as t.s

  And the link it...

$ moxie-elf-ld -o t.x a.out

And then...

$ moxie-elf-objdump -h t.x

t.x:     file format elf32-bigmoxie

Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000012  00001000  00001000  00000054  2**0

But I need to change the LMA to 0 for my processor verilog tests so....

$ moxie-elf-objcopy --change-section-lma .text-0x1000 t.x t0.x
moxie-elf-objcopy: t.x: error in private header data: sorry, cannot handle this

In this section of elf.c, map->count is 0 in my case...

          /* PR 23932.  A corrupt input file may contain sections that cannot   
             be assigned to any segment - because for example they have a       
             negative size - or segments that do not contain any sections.  */  

          if (map->count == 0)                                                  
              bfd_set_error (bfd_error_sorry);                                  
              free (sections);                                                  
              return FALSE;                                                     

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]