diff options
author | Nick Clifton <nickc@redhat.com> | 2014-03-19 08:51:20 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-03-19 08:51:20 +0000 |
commit | 1d63324c56f29034782396ce7f25c09edd0cdc6e (patch) | |
tree | 586816f37f7e0ab39b228af4006804e408bf824f /ld | |
parent | 0172b6a7deca953ff33b4458da2f4e666bee7e51 (diff) | |
download | gdb-1d63324c56f29034782396ce7f25c09edd0cdc6e.zip gdb-1d63324c56f29034782396ce7f25c09edd0cdc6e.tar.gz gdb-1d63324c56f29034782396ce7f25c09edd0cdc6e.tar.bz2 |
Improve .rsrc section merging with better handling of the alignment adjustments
made between merged .rsrc sections.
* peXXigen.c (rsrc_align): New function. Attempts to cope with
alignment variances when .rsrc sections are merged.
(rsrc_process_section): Use rsrc_align.
* Makefile.am (default-manifest.o): Use WINDRES_FOR_TARGET.
* Makefile.in: Regenerate.
* emultempl/default-manifest.rc: Fix typo.
* scripttempl/pe.sc (R_RSRC): Fix default-manifest exclusion.
(.rsrc): Add SUBALIGN(4).
* scripttempl/pep.sc: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 9 | ||||
-rw-r--r-- | ld/Makefile.am | 2 | ||||
-rw-r--r-- | ld/Makefile.in | 2 | ||||
-rw-r--r-- | ld/emultempl/default-manifest.rc | 2 | ||||
-rw-r--r-- | ld/scripttempl/pe.sc | 4 | ||||
-rw-r--r-- | ld/scripttempl/pep.sc | 4 |
6 files changed, 16 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index af8924d..f1855e4 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2014-03-19 Nick Clifton <nickc@redhat.com> + + * Makefile.am (default-manifest.o): Use WINDRES_FOR_TARGET. + * Makefile.in: Regenerate. + * emultempl/default-manifest.rc: Fix typo. + * scripttempl/pe.sc (R_RSRC): Fix default-manifest exclusion. + (.rsrc): Add SUBALIGN(4). + * scripttempl/pep.sc: Likewise. + 2014-03-17 Christopher Faylor <me.cygwin2014@cgf.cx> * Makefile.am: Use host version of windres. diff --git a/ld/Makefile.am b/ld/Makefile.am index e89a6c1..795663f 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -1927,7 +1927,7 @@ eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \ # Rule to create a manifest file for Cygwin and Mingw. default-manifest.o: $(srcdir)/emultempl/default-manifest.rc - ${WINDRES} -o $@ $< + ${WINDRES_FOR_TARGET} -o $@ $< # We need this for automake to use YLWRAP. EXTRA_ld_new_SOURCES = deffilep.y ldlex.l diff --git a/ld/Makefile.in b/ld/Makefile.in index 0c14694..3c9f8f4 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -3359,7 +3359,7 @@ eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \ # Rule to create a manifest file for Cygwin and Mingw. default-manifest.o: $(srcdir)/emultempl/default-manifest.rc - ${WINDRES} -o $@ $< + ${WINDRES_FOR_TARGET} -o $@ $< check-DEJAGNU: site.exp srcroot=`cd $(srcdir) && pwd`; export srcroot; \ diff --git a/ld/emultempl/default-manifest.rc b/ld/emultempl/default-manifest.rc index a4d303f..122f5e8 100644 --- a/ld/emultempl/default-manifest.rc +++ b/ld/emultempl/default-manifest.rc @@ -1,7 +1,7 @@ LANGUAGE 0, 0 /* CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST MOVEABLE PURE DISCARDABLE */ -1 9 MOVEABLE PURE DISCARDABLE +1 24 MOVEABLE PURE DISCARDABLE BEGIN "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>\n" "<assembly xmlns=""urn:schemas-microsoft-com:asm.v1"" manifestVersion=""1.0"">\n" diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index 6cf59ea..4a1951c 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -54,7 +54,7 @@ if test "${RELOCATING}"; then binaries to run under Windows 8 (or later). It is included as the last resource file so that if the application has provided its own manifest then that one will take precedence. */ - *(EXCLUDE_FILE ($DEFAULT_MANIFEST) .rsrc) + *(EXCLUDE_FILE (*$DEFAULT_MANIFEST) .rsrc) *(SORT(.rsrc*)) KEEP ($DEFAULT_MANIFEST(.rsrc))" fi @@ -214,7 +214,7 @@ SECTIONS ${RELOCATING+ __end__ = .;} } - .rsrc ${RELOCATING+BLOCK(__section_alignment__)} : + .rsrc ${RELOCATING+BLOCK(__section_alignment__)} : SUBALIGN(4) { ${R_RSRC} } diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc index 324a743..592489a 100644 --- a/ld/scripttempl/pep.sc +++ b/ld/scripttempl/pep.sc @@ -54,7 +54,7 @@ if test "${RELOCATING}"; then binaries to run under Windows 8 (or later). It is included as the last resource file so that if the application has provided its own manifest then that one will take precedence. */ - *(EXCLUDE_FILE ($DEFAULT_MANIFEST) .rsrc) + *(EXCLUDE_FILE (*$DEFAULT_MANIFEST) .rsrc) *(SORT(.rsrc*)) KEEP ($DEFAULT_MANIFEST(.rsrc))" fi @@ -219,7 +219,7 @@ SECTIONS ${RELOCATING+ __end__ = .;} } - .rsrc ${RELOCATING+BLOCK(__section_alignment__)} : + .rsrc ${RELOCATING+BLOCK(__section_alignment__)} : SUBALIGN(4) { ${R_RSRC} } |