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.
This commit is contained in:
parent
288c6b306e
commit
6caf711179
5 changed files with 75 additions and 75 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue