From: Brian Ford Date: Fri, 7 May 2004 15:17:58 +0000 (+0000) Subject: * emultempl/pe.em (real_flags): New static. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26d2d8a262f6d6248ec4a76dbcca532a42af2130;p=binutils-gdb.git * emultempl/pe.em (real_flags): New static. (OPTION_LARGE_ADDRESS_AWARE): New define. (gld${EMULATION_NAME}_add_options): Add --large-address-aware option. (gld_${EMULATION_NAME}_list_options): Likewise. (gld${EMULATION_NAME}_handle_option): Likewise. (gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data. * ld.texinfo: Document it. * NEWS: Mention it. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index a81c5d64b77..20222ff9102 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,15 @@ +2004-05-07 Brian Ford + DJ Delorie + + * emultempl/pe.em (real_flags): New static. + (OPTION_LARGE_ADDRESS_AWARE): New define. + (gld${EMULATION_NAME}_add_options): Add --large-address-aware option. + (gld_${EMULATION_NAME}_list_options): Likewise. + (gld${EMULATION_NAME}_handle_option): Likewise. + (gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data. + * ld.texinfo: Document it. + * NEWS: Mention it. + 2004-05-07 Brian Ford * NEWS: Mention DWARF 2 support for i386pe. diff --git a/ld/NEWS b/ld/NEWS index 39db029971f..cec229be647 100644 --- a/ld/NEWS +++ b/ld/NEWS @@ -1,5 +1,8 @@ -*- text -*- +* New PE --large-address-aware option to indicate executables support virtual + addresses greater than 2 gigabytes. + * DWARF 2 support for i386pe added. * The linker script operator DEFINED() will now yield 1 only for a symbol that diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 7d6c2e8a6d1..a3b50afc719 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -62,6 +62,11 @@ cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <pe_opthdr = pe; pe_data (output_bfd)->dll = init[DLLOFF].value; + pe_data (output_bfd)->real_flags |= real_flags; #ifdef DLL_SUPPORT if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */ diff --git a/ld/ld.texinfo b/ld/ld.texinfo index f50d79afade..41279685a9f 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -1872,6 +1872,15 @@ If given, the stdcall suffixes (@@@var{nn}) will be stripped from symbols before they are exported. [This option is specific to the i386 PE targeted port of the linker] +@kindex --large-address-aware +@item --large-address-aware +If given, the appropriate bit in the ``Charateristics'' field of the COFF +header is set to indicate that this executable supports virtual addresses +greater than 2 gigabytes. This should be used in conjuction with the /3GB +or /USERVA=@var{value} megabytes switch in the ``[operating systems]'' +section of the BOOT.INI. Otherwise, this bit has no effect. +[This option is specific to PE targeted ports of the linker] + @kindex --major-image-version @item --major-image-version @var{value} Sets the major number of the ``image version''. Defaults to 1.