BFD failed to load binary

2016-01-23 Thread Adarsh Dinesh
Hello,

BFD failed to load ELF files with manipulated instructions in
__stack_chk_fail@plt which can be made for anti debugging purpose.

00400480 <__stack_chk_fail@plt>:
 400480:   ff 25 9a 0b 20 00   jmpq   *0x200b9a(%rip)#
601020 <_GLOBAL_OFFSET_TABLE_+0x20>
 400486:   68 01 00 00 00  pushq  $0x1
 40048b:   e9 d0 ff ff ff  jmpq   400460 <_init+0x20>

Attaching binary sample which execute fine but failed to debug.

This is the message displayed while GDB crashing

Reading symbols from ./mutate.out...BFD: BFD (Ubuntu 7.10-1ubuntu2) 2.25.51
internal error, aborting at /build/gdb-HnfxP_/gdb-7.10/bfd/elf64-x86-64.c
line 5770 in elf_x86_6
4_get_plt_sym_val

BFD: Please report this bug.

Best,
Adu
-- 
-- लोकाः समस्ताः सुखिनो भवन्तु --

*pub_key*


crash_sample.out
Description: Binary data


original.out
Description: Binary data
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19516] New: microblaze: invalid symbol indices in GLOB_DAT relocs

2016-01-23 Thread bugdal at aerifal dot cx
https://sourceware.org/bugzilla/show_bug.cgi?id=19516

Bug ID: 19516
   Summary: microblaze: invalid symbol indices in GLOB_DAT relocs
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: bugdal at aerifal dot cx
  Target Milestone: ---

Current git versions of musl libc (since commit ad1cd43a86) are producing a
libc.so that crashes during startup due to a bogus GLOB_DAT relocations with
symbol index 0xff in libc's dynamic symbol table. I don't have a minimal
test case to reproduce it yet, but the problem seems to be an interaction of
several features including --gc-sections, -Bsymbolic-functions, and possibly
hidden-visibility weak references.

I've identified the code that's producing these invalid relocations:

https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/elf32-microblaze.c;h=b9c32a4b2e9e09988e2a9e8898ccd888207f8794;hb=HEAD#l3293

The 'if' code path has some exclusions so that the 'else' path can be taken
even when h->dynindx==-1, and in this case, it becomes 0xff when limited to
the 24-bit symbol index field of r_info.

IMO microblaze_elf_output_dynamic_relocation should have an assertion to check
for index -1 when producing a relocation that references a symbol, since this
is malformed. But I'm not sure whether fixing the above logic is sufficient to
fix the bug. It's possible that these GOT slots referencing symbol index -1
should have been removed much earlier in the linking process.

I'll try to follow up with a minimal test case or see if one of our users
affected by the issue can do so.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19516] microblaze: invalid symbol indices in GLOB_DAT relocs

2016-01-23 Thread bugdal at aerifal dot cx
https://sourceware.org/bugzilla/show_bug.cgi?id=19516

--- Comment #1 from Rich Felker  ---
For reference here is the link to the first version of musl affected which can
be used to reproduce the bug:

http://git.musl-libc.org/cgit/musl/commit/?id=ad1cd43a86645ba2d4f7c8747240452a349d6bc1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19091] sh: FDPIC linker fails to produce DT_PLTGOT for some files

2016-01-23 Thread bugdal at aerifal dot cx
https://sourceware.org/bugzilla/show_bug.cgi?id=19091

Rich Felker  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Rich Felker  ---
Marking this as fixed since the patch was applied.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/19516] microblaze: invalid symbol indices in GLOB_DAT relocs

2016-01-23 Thread wbx at openadk dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=19516

wbx at openadk dot org changed:

   What|Removed |Added

 CC||wbx at openadk dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/19435] objdump receives SIGABRT when disassembling Mach O binary on OS X

2016-01-23 Thread iankronquist at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19435

--- Comment #7 from Ian Kronquist  ---
Hi Nick,
Those patches fix the problem, or at the very least hide it.

Sincerely,
Ian Kronquist

On Fri, Jan 22, 2016 at 3:52 AM, nickc at redhat dot com <
sourceware-bugzi...@sourceware.org> wrote:

> https://sourceware.org/bugzilla/show_bug.cgi?id=19435
>
> --- Comment #6 from Nick Clifton  ---
> I missed a bit...
>
> diff --git a/bfd/mach-o.c b/bfd/mach-o.c
> index 72454f9..a712ff6 100644
> --- a/bfd/mach-o.c
> +++ b/bfd/mach-o.c
> @@ -5798,14 +5798,16 @@ bfd_mach_o_close_and_cleanup (bfd *abfd)
>if (mdata->dsym_bfd != NULL)
>  {
>bfd *fat_bfd = mdata->dsym_bfd->my_archive;
> +#if 0
>char *dsym_filename = (char *)(fat_bfd
>   ? fat_bfd->filename
>   : mdata->dsym_bfd->filename);
> +#endif
>bfd_close (mdata->dsym_bfd);
>mdata->dsym_bfd = NULL;
>if (fat_bfd)
>  bfd_close (fat_bfd);
> -  free (dsym_filename);
> +  /*free (dsym_filename);*/
>  }
>  }
>
> Cheers
>   Nick
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.
>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils