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


On Fri, 2 Jan 2004, Nick Clifton wrote:
>
> Not really.  Internally the VirtualSize value is stored as the s_paddr
> field of the bfd section structure, so my guess would be that at some
> point this field is being set to zero.
>
> > and how to fix it?
>
> You could put a watchpoint on the relevant s_paddr field and find out
> when/where it is set to zero.
>
> If you can provide a *small* reproducible test case and post it to
> this list then we may be able to investigate ourselves.

Small reproducible test case attached below.  When run with binutils
2.11.90.0.8, the VirtualSize field is nonzero.  When run with binutils
2.14.90.0.4, the VirtualSize field is zero.

						Brian J. Johnson

--------------------------------------------------------------------
#!/bin/sh
set -x

cat > try.c <<END
#include <efi.h>
#include <efilib.h>

EFI_STATUS
efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *system_tab)
{
  return EFI_SUCCESS;
}
END

gcc -I. -I/usr/include/efi -I/usr/include/efi/ia64 -I/usr/include/efi/protocol -O2  -fpic -fshort-wchar -Wall -fno-merge-constants -mfixed-range=f32-f127 -DCONFIG_ia64  -c try.c -o try.o

ld -nostdlib -T /usr/lib/gnuefi/elf_ia64_efi.lds -shared -Bsymbolic -L/usr/lib /usr/lib/gnuefi/crt0-efi-ia64.o try.o -o try.so -L/usr/lib -lefi -lgnuefi

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


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