mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
* coffswap.h (coff_swap_scnhdr_in): Don't always add IMAGE_BASE.
Swap in PE header. * coffcode.h (coff_write_object_contents): Remove #if0ed code Only remove empty sections in PE inmage files.
This commit is contained in:
@ -10,10 +10,12 @@ Tue Aug 29 13:50:21 1995 steve chamberlain <sac@slash.cygnus.com>
|
|||||||
(coff-i386_rtype_to_howto): Understand R_IMAGEBASE type.
|
(coff-i386_rtype_to_howto): Understand R_IMAGEBASE type.
|
||||||
* coffcode.h (sec_to_styp_flags): .edata is data.
|
* coffcode.h (sec_to_styp_flags): .edata is data.
|
||||||
(coff_compute_section_file_positions): Get page size right for PE.
|
(coff_compute_section_file_positions): Get page size right for PE.
|
||||||
|
Pagesize info is only valid in PE image files.
|
||||||
(fill_pe_header_info): Fix fields.
|
(fill_pe_header_info): Fix fields.
|
||||||
(coff_write_object_contents): Remove end_of_image calc.
|
(coff_write_object_contents): Remove end_of_image calc.
|
||||||
(_bfd_coff_generate_reloc_section): Remove orphaned comment.
|
(_bfd_coff_generate_reloc_section): Remove orphaned comment.
|
||||||
* coffswap.h (coff_swap_scnhdr_in): Don't always add IMAGE_BASE.
|
* coffswap.h (coff_swap_scnhdr_in): Don't always add IMAGE_BASE.
|
||||||
|
Swap in PE header.
|
||||||
(coff_swap_scnhdr_out): Setup PE flags correctly.
|
(coff_swap_scnhdr_out): Setup PE flags correctly.
|
||||||
* reloc.c (BFD_RELOC_RVA): New field.
|
* reloc.c (BFD_RELOC_RVA): New field.
|
||||||
|
|
||||||
|
@ -1513,13 +1513,18 @@ coff_compute_section_file_positions (abfd)
|
|||||||
#endif
|
#endif
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
|
||||||
|
|
||||||
#ifdef COFF_IMAGE_WITH_PE
|
#ifdef COFF_IMAGE_WITH_PE
|
||||||
|
if (coff_data (abfd)->link_info)
|
||||||
|
{
|
||||||
page_size = pe_value (&(coff_data (abfd)->link_info->pe_info->file_alignment),
|
page_size = pe_value (&(coff_data (abfd)->link_info->pe_info->file_alignment),
|
||||||
PE_DEF_FILE_ALIGNMENT);
|
PE_DEF_FILE_ALIGNMENT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
page_size = PE_DEF_FILE_ALIGNMENT;
|
||||||
#else
|
#else
|
||||||
page_size = COFF_PAGE_SIZE;
|
page_size = COFF_PAGE_SIZE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (bfd_get_start_address (abfd))
|
if (bfd_get_start_address (abfd))
|
||||||
{
|
{
|
||||||
/* A start address may have been added to the original file. In this
|
/* A start address may have been added to the original file. In this
|
||||||
|
Reference in New Issue
Block a user