https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #200 from Peter Bisroev <peter.bisroev at groundlabs dot com> ---
(In reply to dave.anglin from comment #199)
> On 2020-02-22 4:09 p.m., peter.bisroev at groundlabs dot com wrote:
> > Reassembled with GNU's as and relinked. PCREL21B changes to PCREL60B, but 
> > when
> > I try to run the binary I get an "Illegal instruction" and a core dump. The
> > illegal instruction seems to be the brl. I know almost nothing of IA-64
> > assembly, so will read up a bit more and try to figure out what is going on
> > there.
> That suggests to me that HP's aCC generates 64-bit ELF code and gcc
> generates 32-bit code.
> Compare header info of the two executable files with readelf.
> 
> I'm not sure why we are struggling with the 32-bit runtime.

They both seem to be ELF32
------------------------------
$ readelf -h hello
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 01 01 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - HP-UX
  ABI Version:                       1
  Type:                              EXEC (Executable file)
  Machine:                           Intel IA-64
  Version:                           0x1
  Entry point address:               0x4000980
  Start of program headers:          52 (bytes into file)
  Start of section headers:          69184 (bytes into file)
  Flags:                             0x8, 32-bit
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         12
  Size of section headers:           40 (bytes)
  Number of section headers:         37
  Section header string table index: 36

$ readelf -h hello-gcc 
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 01 01 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - HP-UX
  ABI Version:                       1
  Type:                              EXEC (Executable file)
  Machine:                           Intel IA-64
  Version:                           0x1
  Entry point address:               0x4000930
  Start of program headers:          52 (bytes into file)
  Start of section headers:          67824 (bytes into file)
  Flags:                             0x8, 32-bit
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         12
  Size of section headers:           40 (bytes)
  Number of section headers:         34
  Section header string table index: 33
----------

I am looking for any other differences now.

Reply via email to