This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IA64 PE/COFF (efi-app-ia64) image has bad VirtualSize field


Hi Brian,

> They're part of the gnu-efi toolkit.

Which, unfortunately, I do not have.

> Here's the assembly language output from gcc 2.96 (gcc 3.x is nearly
> identical):

Thanks.

I am still having problems however, as when I assemble, link and
convert this file it appears that the VirtualSize field is set to a
non-zero value.  Here is what I did (using an ia64-elf toolchain built
from todays binutils sources in the CVS repository, running on an x86
processor running RH EL3):

  % as try.s -o try.o
  % ld -nostdlib -shared -Bsymbolic -L/usr/lib try.o -o try.so \
    -L/usr/lib
  
  [I left out the crt0-efi-ia64.o start up file, the libefi.so and
   libgnuefi.so libraries and the elf_ia64_efi.lds linker script as I
   did not have any of these]

  % objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
    -j .rela -j .reloc --target=efi-app-ia64 try.so try.efi

  % od -t x1z try.efi
  [snip]
0000640 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 40  >............@..@<
0000660 2e 74 65 78 74 00 00 00 10 00 00 00 60 03 00 00  >.text.......`...<
0000700 00 02 00 00 60 07 00 00 00 00 00 00 00 00 00 00  >....`...........<
  [snip]

Which, if I am reading this correctly, indicates that the .text
section starts at 0x660 and the VirtualSize, at 8 bytes further on (ie
0x668) is 0x00000010.  This is also born out by running "objdump -h":

  Idx Name          Size      VMA               LMA               File off  Algn
    1 .text         00000010  0000000000000360  0000000000000360  00000760  2**2
                    CONTENTS, ALLOC, LOAD, READONLY, CODE

Which shows a 0x10 byte .text section.

I am trying to download the gun-efi release to see if the linker map
is the key to the problem, but so far all the FTP servers that I have
tried have been busy...

Cheers
        Nick
        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]