https://sourceware.org/bugzilla/show_bug.cgi?id=16533

            Bug ID: 16533
           Summary: Gold does not set HASENTRY attribute on ARM
           Product: binutils
           Version: 2.25 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ian at airs dot com
          Reporter: y.gribov at samsung dot com
                CC: ccoutant at google dot com

Created attachment 7396
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7396&action=edit
Proposed patch

I've recently detected an inconsistency between ld.bfd and ld.gold on ARM
platforms. It seems that Gold does not set entry flag in ELF header:

# Binutils with --enable-gold=no
$ arm-v7a15v5r0-linux-gnueabi-gcc justmain.c
$ arm-v7a15v5r0-linux-gnueabi-readelf -h a.out
ELF Header:
  ...
  Flags:                             0x5000202, has entry point, Version5 EABI,
<unknown>

# Binutils with --enable-gold=default
$ arm-v7a15v5r0-linux-gnueabi-gcc justmain.c
$ arm-v7a15v5r0-linux-gnueabi-readelf -h a.out
ELF Header:
  ...
  Flags:                             0x5000000, Version5 EABI

The attached simple patch seems to fix this:
$ arm-v7a15v5r0-linux-gnueabi-readelf -h a.out
ELF Header:
  ...
  Flags:                             0x5000002, has entry point, Version5 EABI

-- 
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

Reply via email to