mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-14 07:38:41 +00:00
[PATCH] Fix PE-COFF bug in orphan section alignment handling.
ld/ChangeLog: 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Preserve alignment of input sections when creating orphan output sections during relocatable link. * emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
This commit is contained in:
parent
293855c8bb
commit
4bf0cafb35
@ -1,3 +1,10 @@
|
||||
2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Preserve
|
||||
alignment of input sections when creating orphan output sections
|
||||
during relocatable link.
|
||||
* emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
|
||||
|
||||
2011-03-04 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* ld.texinfo: Document --verbose[=NUMBER].
|
||||
|
@ -2009,10 +2009,17 @@ gld_${EMULATION_NAME}_place_orphan (asection *s,
|
||||
->output_section_statement);
|
||||
}
|
||||
|
||||
/* All sections in an executable must be aligned to a page boundary. */
|
||||
/* All sections in an executable must be aligned to a page boundary.
|
||||
In a relocatable link, just preserve the incoming alignment; the
|
||||
address is discarded by lang_insert_orphan in that case, anyway. */
|
||||
address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
|
||||
os = lang_insert_orphan (s, secname, constraint, after, place, address,
|
||||
&add_child);
|
||||
if (link_info.relocatable)
|
||||
{
|
||||
os->section_alignment = s->alignment_power;
|
||||
os->bfd_section->alignment_power = s->alignment_power;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the section name has a '\$', sort it with the other '\$'
|
||||
|
@ -1748,10 +1748,17 @@ gld_${EMULATION_NAME}_place_orphan (asection *s,
|
||||
->output_section_statement);
|
||||
}
|
||||
|
||||
/* All sections in an executable must be aligned to a page boundary. */
|
||||
/* All sections in an executable must be aligned to a page boundary.
|
||||
In a relocatable link, just preserve the incoming alignment; the
|
||||
address is discarded by lang_insert_orphan in that case, anyway. */
|
||||
address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
|
||||
os = lang_insert_orphan (s, secname, constraint, after, place, address,
|
||||
&add_child);
|
||||
if (link_info.relocatable)
|
||||
{
|
||||
os->section_alignment = s->alignment_power;
|
||||
os->bfd_section->alignment_power = s->alignment_power;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the section name has a '\$', sort it with the other '\$'
|
||||
|
Loading…
Reference in New Issue
Block a user