diff options
author | Nick Clifton <nickc@redhat.com> | 2014-03-19 14:46:15 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-03-19 14:46:15 +0000 |
commit | 6caf711179d96da75860b79434bc792c92c0fa4c (patch) | |
tree | 174fae83e96c11e428cb598c4fe2db8efb6abb54 /ld/scripttempl | |
parent | 288c6b306e6e5531647968bdcd99594bf0483802 (diff) | |
download | gdb-6caf711179d96da75860b79434bc792c92c0fa4c.zip gdb-6caf711179d96da75860b79434bc792c92c0fa4c.tar.gz gdb-6caf711179d96da75860b79434bc792c92c0fa4c.tar.bz2 |
Improve .rsrc section merging again. This time with an algorithm that
should work for all types of input .rsrc section.
* peXXigen.c (rsrc_process_section): Add code to scan input
sections and record their lengths. Use these lengths to find the
start of each merged .rsrc section.
* scripttempl/pe.sc (R_RSRC): Fix default-manifest exclusion.
(.rsrc): Add SUBALIGN(4). Remove SORT.
* scripttempl/pep.sc: Likewise.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/pe.sc | 9 | ||||
-rw-r--r-- | ld/scripttempl/pep.sc | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index 4a1951c..e9e5f64 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -47,15 +47,18 @@ if test "${RELOCATING}"; then if test -z "$DEFAULT_MANIFEST"; then R_RSRC=' *(.rsrc) - *(SORT(.rsrc$*))' + *(.rsrc$*)' else R_RSRC=" /* The default manifest contains information necessary for 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. */ + its own manifest then that one will take precedence. + + Note - the .rsrc section merging code relies upon the fact + that the input .rsrc sections are *not* sorted. */ *(EXCLUDE_FILE (*$DEFAULT_MANIFEST) .rsrc) - *(SORT(.rsrc*)) + *(.rsrc*) KEEP ($DEFAULT_MANIFEST(.rsrc))" fi else diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc index 592489a..5f97d31 100644 --- a/ld/scripttempl/pep.sc +++ b/ld/scripttempl/pep.sc @@ -47,15 +47,18 @@ if test "${RELOCATING}"; then if test -z "$DEFAULT_MANIFEST"; then R_RSRC=' *(.rsrc) - *(SORT(.rsrc$*))' + *(.rsrc$*)' else R_RSRC=" /* The default manifest contains information necessary for 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. */ + its own manifest then that one will take precedence. + + Note - the .rsrc section merging code relies upon the fact + that the input .rsrc sections are *not* sorted. */ *(EXCLUDE_FILE (*$DEFAULT_MANIFEST) .rsrc) - *(SORT(.rsrc*)) + *(.rsrc*) KEEP ($DEFAULT_MANIFEST(.rsrc))" fi else |