diff options
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r-- | bfd/peXXigen.c | 328 |
1 files changed, 164 insertions, 164 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index db44053..297f773 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -294,7 +294,7 @@ _bfd_XXi_swap_aux_in (bfd * abfd, int in_class, int indx ATTRIBUTE_UNUSED, int numaux ATTRIBUTE_UNUSED, - void * in1) + void * in1) { AUXENT *ext = (AUXENT *) ext1; union internal_auxent *in = (union internal_auxent *) in1; @@ -540,7 +540,7 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd, for (idx = 0; idx < a->NumberOfRvaAndSizes; idx++) { - /* If data directory is empty, rva also should be 0. */ + /* If data directory is empty, rva also should be 0. */ int size = H_GET_32 (abfd, src->DataDirectory[idx][1]); @@ -974,8 +974,8 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, void * in, void * out) } else { - ps = 0; - ss = scnhdr_int->s_size; + ps = 0; + ss = scnhdr_int->s_size; } } else @@ -1018,7 +1018,7 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, void * in, void * out) typedef struct { - const char * section_name; + const char * section_name; unsigned long must_have; } pe_required_section_flags; @@ -1094,9 +1094,9 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, void * in, void * out) } /* Although we could encode 0xffff relocs here, we do not, to be - consistent with other parts of bfd. Also it lets us warn, as - we should never see 0xffff here w/o having the overflow flag - set. */ + consistent with other parts of bfd. Also it lets us warn, as + we should never see 0xffff here w/o having the overflow flag + set. */ if (scnhdr_int->s_nreloc < 0xffff) H_PUT_16 (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc); else @@ -1169,8 +1169,8 @@ _bfd_XXi_slurp_codeview_record (bfd * abfd, file_ptr where, unsigned long length cvinfo->Age = H_GET_32(abfd, cvinfo70->Age); /* A GUID consists of 4,2,2 byte values in little-endian order, followed - by 8 single bytes. Byte swap them so we can conveniently treat the GUID - as 16 bytes in big-endian order. */ + by 8 single bytes. Byte swap them so we can conveniently treat the GUID + as 16 bytes in big-endian order. */ bfd_putb32 (bfd_getl32 (cvinfo70->Signature), cvinfo->Signature); bfd_putb16 (bfd_getl16 (&(cvinfo70->Signature[4])), &(cvinfo->Signature[4])); bfd_putb16 (bfd_getl16 (&(cvinfo70->Signature[6])), &(cvinfo->Signature[6])); @@ -1182,7 +1182,7 @@ _bfd_XXi_slurp_codeview_record (bfd * abfd, file_ptr where, unsigned long length return cvinfo; } else if ((cvinfo->CVSignature == CVINFO_PDB20_CVSIGNATURE) - && (length > sizeof (CV_INFO_PDB20))) + && (length > sizeof (CV_INFO_PDB20))) { CV_INFO_PDB20 *cvinfo20 = (CV_INFO_PDB20 *)(buffer); cvinfo->Age = H_GET_32(abfd, cvinfo20->Age); @@ -1309,12 +1309,12 @@ pe_print_idata (bfd * abfd, void * vfile) return TRUE; } else if (!(section->flags & SEC_HAS_CONTENTS)) - { + { fprintf (file, _("\nThere is an import table in %s, but that section has no contents\n"), section->name); return TRUE; - } + } } /* xgettext:c-format */ @@ -1349,11 +1349,11 @@ pe_print_idata (bfd * abfd, void * vfile) offset = abfd->start_address - rel_section->vma; if (offset >= rel_section->size || offset + 8 > rel_section->size) - { - if (data != NULL) - free (data); - return FALSE; - } + { + if (data != NULL) + free (data); + return FALSE; + } start_address = bfd_get_32 (abfd, data + offset); loadable_toc_address = bfd_get_32 (abfd, data + offset + 4); @@ -1425,7 +1425,7 @@ pe_print_idata (bfd * abfd, void * vfile) break; if (dll_name - adj >= section->size) - break; + break; dll = (char *) data + dll_name - adj; /* PR 17512 file: 078-12277-0.004. */ @@ -1603,14 +1603,14 @@ pe_print_edata (bfd * abfd, void * vfile) bfd_vma adj; struct EDT_type { - long export_flags; /* Reserved - should be zero. */ + long export_flags; /* Reserved - should be zero. */ long time_stamp; short major_ver; short minor_ver; - bfd_vma name; /* RVA - relative to image base. */ - long base; /* Ordinal base. */ + bfd_vma name; /* RVA - relative to image base. */ + long base; /* Ordinal base. */ unsigned long num_functions;/* Number in the export address table. */ - unsigned long num_names; /* Number in the name pointer table. */ + unsigned long num_names; /* Number in the name pointer table. */ bfd_vma eat_addr; /* RVA to the export address table. */ bfd_vma npt_addr; /* RVA to the Export Name Pointer Table. */ bfd_vma ot_addr; /* RVA to the Ordinal Table. */ @@ -1651,12 +1651,12 @@ pe_print_edata (bfd * abfd, void * vfile) return TRUE; } else if (!(section->flags & SEC_HAS_CONTENTS)) - { + { fprintf (file, _("\nThere is an export table in %s, but that section has no contents\n"), section->name); return TRUE; - } + } dataoff = addr - section->vma; datasize = extra->DataDirectory[PE_EXPORT_TABLE].Size; @@ -1692,17 +1692,17 @@ pe_print_edata (bfd * abfd, void * vfile) return FALSE; /* Go get Export Directory Table. */ - edt.export_flags = bfd_get_32 (abfd, data + 0); - edt.time_stamp = bfd_get_32 (abfd, data + 4); - edt.major_ver = bfd_get_16 (abfd, data + 8); - edt.minor_ver = bfd_get_16 (abfd, data + 10); - edt.name = bfd_get_32 (abfd, data + 12); - edt.base = bfd_get_32 (abfd, data + 16); + edt.export_flags = bfd_get_32 (abfd, data + 0); + edt.time_stamp = bfd_get_32 (abfd, data + 4); + edt.major_ver = bfd_get_16 (abfd, data + 8); + edt.minor_ver = bfd_get_16 (abfd, data + 10); + edt.name = bfd_get_32 (abfd, data + 12); + edt.base = bfd_get_32 (abfd, data + 16); edt.num_functions = bfd_get_32 (abfd, data + 20); - edt.num_names = bfd_get_32 (abfd, data + 24); - edt.eat_addr = bfd_get_32 (abfd, data + 28); - edt.npt_addr = bfd_get_32 (abfd, data + 32); - edt.ot_addr = bfd_get_32 (abfd, data + 36); + edt.num_names = bfd_get_32 (abfd, data + 24); + edt.eat_addr = bfd_get_32 (abfd, data + 28); + edt.npt_addr = bfd_get_32 (abfd, data + 32); + edt.ot_addr = bfd_get_32 (abfd, data + 36); adj = section->vma - extra->ImageBase + dataoff; @@ -1768,8 +1768,8 @@ pe_print_edata (bfd * abfd, void * vfile) forward the call to another dll. Something like: typedef union { - long export_rva; - long forwarder_rva; + long export_rva; + long forwarder_rva; } export_address_table_entry; */ fprintf (file, @@ -1953,10 +1953,10 @@ pe_print_pdata (bfd * abfd, void * vfile) if (i + PDATA_ROW_SIZE > stop) break; - begin_addr = GET_PDATA_ENTRY (abfd, data + i ); - end_addr = GET_PDATA_ENTRY (abfd, data + i + 4); + begin_addr = GET_PDATA_ENTRY (abfd, data + i ); + end_addr = GET_PDATA_ENTRY (abfd, data + i + 4); eh_handler = GET_PDATA_ENTRY (abfd, data + i + 8); - eh_data = GET_PDATA_ENTRY (abfd, data + i + 12); + eh_data = GET_PDATA_ENTRY (abfd, data + i + 12); prolog_end_addr = GET_PDATA_ENTRY (abfd, data + i + 16); if (begin_addr == 0 && end_addr == 0 && eh_handler == 0 @@ -2019,7 +2019,7 @@ pe_print_pdata (bfd * abfd, void * vfile) typedef struct sym_cache { - int symcount; + int symcount; asymbol ** syms; } sym_cache; @@ -2154,8 +2154,8 @@ _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) fprintf (file, "%2d %2d ", flag32bit, exception_flag); /* Get the exception handler's address and the data passed from the - .text section. This is really the data that belongs with the .pdata - but got "compressed" out for the ARM and SH4 architectures. */ + .text section. This is really the data that belongs with the .pdata + but got "compressed" out for the ARM and SH4 architectures. */ tsection = bfd_get_section_by_name (abfd, ".text"); if (tsection && coff_section_data (abfd, tsection) && pei_section_data (abfd, tsection)) @@ -2322,13 +2322,13 @@ rsrc_print_resource_directory (FILE * , bfd *, unsigned int, bfd_byte *, or section_end + 1 upon failure. */ static bfd_byte * -rsrc_print_resource_entries (FILE * file, - bfd * abfd, +rsrc_print_resource_entries (FILE * file, + bfd * abfd, unsigned int indent, bfd_boolean is_name, - bfd_byte * data, + bfd_byte * data, rsrc_regions * regions, - bfd_vma rva_bias) + bfd_vma rva_bias) { unsigned long entry, addr, size; bfd_byte * leaf; @@ -2443,12 +2443,12 @@ rsrc_print_resource_entries (FILE * file, #define min(a,b) ((a) < (b) ? (a) : (b)) static bfd_byte * -rsrc_print_resource_directory (FILE * file, - bfd * abfd, +rsrc_print_resource_directory (FILE * file, + bfd * abfd, unsigned int indent, bfd_byte * data, rsrc_regions * regions, - bfd_vma rva_bias) + bfd_vma rva_bias) { unsigned int num_names, num_ids; bfd_byte * highest_data = data; @@ -2639,27 +2639,27 @@ pe_print_debugdata (bfd * abfd, void * vfile) for (section = abfd->sections; section != NULL; section = section->next) { if ((addr >= section->vma) && (addr < (section->vma + section->size))) - break; + break; } if (section == NULL) { fprintf (file, - _("\nThere is a debug directory, but the section containing it could not be found\n")); + _("\nThere is a debug directory, but the section containing it could not be found\n")); return TRUE; } else if (!(section->flags & SEC_HAS_CONTENTS)) { fprintf (file, - _("\nThere is a debug directory in %s, but that section has no contents\n"), - section->name); + _("\nThere is a debug directory in %s, but that section has no contents\n"), + section->name); return TRUE; } else if (section->size < size) { fprintf (file, - _("\nError: section %s contains the debug data starting address but it is too small\n"), - section->name); + _("\nError: section %s contains the debug data starting address but it is too small\n"), + section->name); return FALSE; } @@ -2695,43 +2695,43 @@ pe_print_debugdata (bfd * abfd, void * vfile) _bfd_XXi_swap_debugdir_in (abfd, ext, &idd); if ((idd.Type) >= IMAGE_NUMBEROF_DEBUG_TYPES) - type_name = debug_type_names[0]; + type_name = debug_type_names[0]; else - type_name = debug_type_names[idd.Type]; + type_name = debug_type_names[idd.Type]; fprintf (file, " %2ld %14s %08lx %08lx %08lx\n", idd.Type, type_name, idd.SizeOfData, idd.AddressOfRawData, idd.PointerToRawData); if (idd.Type == PE_IMAGE_DEBUG_TYPE_CODEVIEW) - { - char signature[CV_INFO_SIGNATURE_LENGTH * 2 + 1]; + { + char signature[CV_INFO_SIGNATURE_LENGTH * 2 + 1]; /* PR 17512: file: 065-29434-0.001:0.1 We need to use a 32-bit aligned buffer to safely read in a codeview record. */ - char buffer[256 + 1] ATTRIBUTE_ALIGNED_ALIGNOF (CODEVIEW_INFO); + char buffer[256 + 1] ATTRIBUTE_ALIGNED_ALIGNOF (CODEVIEW_INFO); - CODEVIEW_INFO *cvinfo = (CODEVIEW_INFO *) buffer; + CODEVIEW_INFO *cvinfo = (CODEVIEW_INFO *) buffer; - /* The debug entry doesn't have to have to be in a section, + /* The debug entry doesn't have to have to be in a section, in which case AddressOfRawData is 0, so always use PointerToRawData. */ - if (!_bfd_XXi_slurp_codeview_record (abfd, (file_ptr) idd.PointerToRawData, + if (!_bfd_XXi_slurp_codeview_record (abfd, (file_ptr) idd.PointerToRawData, idd.SizeOfData, cvinfo)) - continue; + continue; - for (i = 0; i < cvinfo->SignatureLength; i++) - sprintf (&signature[i*2], "%02x", cvinfo->Signature[i] & 0xff); + for (i = 0; i < cvinfo->SignatureLength; i++) + sprintf (&signature[i*2], "%02x", cvinfo->Signature[i] & 0xff); /* xgettext:c-format */ - fprintf (file, _("(format %c%c%c%c signature %s age %ld)\n"), + fprintf (file, _("(format %c%c%c%c signature %s age %ld)\n"), buffer[0], buffer[1], buffer[2], buffer[3], signature, cvinfo->Age); - } + } } if (size % sizeof (struct external_IMAGE_DEBUG_DIRECTORY) != 0) fprintf (file, - _("The debug directory size is not a multiple of the debug directory entry size\n")); + _("The debug directory size is not a multiple of the debug directory entry size\n")); return TRUE; } @@ -2976,9 +2976,9 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd) bfd_byte *data; if (section && bfd_malloc_and_get_section (obfd, section, &data)) - { - unsigned int i; - struct external_IMAGE_DEBUG_DIRECTORY *dd = + { + unsigned int i; + struct external_IMAGE_DEBUG_DIRECTORY *dd = (struct external_IMAGE_DEBUG_DIRECTORY *)(data + (addr - section->vma)); /* PR 17512: file: 0f15796a. */ @@ -2992,34 +2992,34 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd) return FALSE; } - for (i = 0; i < ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size + for (i = 0; i < ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size / sizeof (struct external_IMAGE_DEBUG_DIRECTORY); i++) - { - asection *ddsection; - struct external_IMAGE_DEBUG_DIRECTORY *edd = &(dd[i]); - struct internal_IMAGE_DEBUG_DIRECTORY idd; + { + asection *ddsection; + struct external_IMAGE_DEBUG_DIRECTORY *edd = &(dd[i]); + struct internal_IMAGE_DEBUG_DIRECTORY idd; - _bfd_XXi_swap_debugdir_in (obfd, edd, &idd); + _bfd_XXi_swap_debugdir_in (obfd, edd, &idd); - if (idd.AddressOfRawData == 0) - continue; /* RVA 0 means only offset is valid, not handled yet. */ + if (idd.AddressOfRawData == 0) + continue; /* RVA 0 means only offset is valid, not handled yet. */ - ddsection = find_section_by_vma (obfd, idd.AddressOfRawData + ope->pe_opthdr.ImageBase); - if (!ddsection) - continue; /* Not in a section! */ + ddsection = find_section_by_vma (obfd, idd.AddressOfRawData + ope->pe_opthdr.ImageBase); + if (!ddsection) + continue; /* Not in a section! */ - idd.PointerToRawData = ddsection->filepos + (idd.AddressOfRawData + idd.PointerToRawData = ddsection->filepos + (idd.AddressOfRawData + ope->pe_opthdr.ImageBase) - ddsection->vma; - _bfd_XXi_swap_debugdir_out (obfd, &idd, edd); - } + _bfd_XXi_swap_debugdir_out (obfd, &idd, edd); + } - if (!bfd_set_section_contents (obfd, section, data, 0, section->size)) + if (!bfd_set_section_contents (obfd, section, data, 0, section->size)) { _bfd_error_handler (_("Failed to update file offsets in debug directory")); return FALSE; } - } + } else if (section) { _bfd_error_handler (_("%B: Failed to read debug data section"), obfd); @@ -3101,12 +3101,12 @@ static bfd_byte * rsrc_count_directory (bfd *, bfd_byte *, bfd_byte *, bfd_byte *, bfd_vma); static bfd_byte * -rsrc_count_entries (bfd * abfd, - bfd_boolean is_name, - bfd_byte * datastart, - bfd_byte * data, - bfd_byte * dataend, - bfd_vma rva_bias) +rsrc_count_entries (bfd * abfd, + bfd_boolean is_name, + bfd_byte * datastart, + bfd_byte * data, + bfd_byte * dataend, + bfd_vma rva_bias) { unsigned long entry, addr, size; @@ -3154,11 +3154,11 @@ rsrc_count_entries (bfd * abfd, } static bfd_byte * -rsrc_count_directory (bfd * abfd, +rsrc_count_directory (bfd * abfd, bfd_byte * datastart, bfd_byte * data, bfd_byte * dataend, - bfd_vma rva_bias) + bfd_vma rva_bias) { unsigned int num_entries, num_ids; bfd_byte * highest_data = data; @@ -3190,7 +3190,7 @@ rsrc_count_directory (bfd * abfd, typedef struct rsrc_dir_chain { - unsigned int num_entries; + unsigned int num_entries; struct rsrc_entry * first_entry; struct rsrc_entry * last_entry; } rsrc_dir_chain; @@ -3210,15 +3210,15 @@ typedef struct rsrc_directory typedef struct rsrc_string { - unsigned int len; - bfd_byte * string; + unsigned int len; + bfd_byte * string; } rsrc_string; typedef struct rsrc_leaf { - unsigned int size; - unsigned int codepage; - bfd_byte * data; + unsigned int size; + unsigned int codepage; + bfd_byte * data; } rsrc_leaf; typedef struct rsrc_entry @@ -3226,18 +3226,18 @@ typedef struct rsrc_entry bfd_boolean is_name; union { - unsigned int id; - struct rsrc_string name; + unsigned int id; + struct rsrc_string name; } name_id; bfd_boolean is_dir; union { struct rsrc_directory * directory; - struct rsrc_leaf * leaf; + struct rsrc_leaf * leaf; } value; - struct rsrc_entry * next_entry; + struct rsrc_entry * next_entry; struct rsrc_directory * parent; } rsrc_entry; @@ -3246,13 +3246,13 @@ rsrc_parse_directory (bfd *, rsrc_directory *, bfd_byte *, bfd_byte *, bfd_byte *, bfd_vma, rsrc_entry *); static bfd_byte * -rsrc_parse_entry (bfd * abfd, - bfd_boolean is_name, - rsrc_entry * entry, - bfd_byte * datastart, - bfd_byte * data, - bfd_byte * dataend, - bfd_vma rva_bias, +rsrc_parse_entry (bfd * abfd, + bfd_boolean is_name, + rsrc_entry * entry, + bfd_byte * datastart, + bfd_byte * data, + bfd_byte * dataend, + bfd_vma rva_bias, rsrc_directory * parent) { unsigned long val, addr, size; @@ -3324,14 +3324,14 @@ rsrc_parse_entry (bfd * abfd, } static bfd_byte * -rsrc_parse_entries (bfd * abfd, +rsrc_parse_entries (bfd * abfd, rsrc_dir_chain * chain, - bfd_boolean is_name, - bfd_byte * highest_data, - bfd_byte * datastart, - bfd_byte * data, - bfd_byte * dataend, - bfd_vma rva_bias, + bfd_boolean is_name, + bfd_byte * highest_data, + bfd_byte * datastart, + bfd_byte * data, + bfd_byte * dataend, + bfd_vma rva_bias, rsrc_directory * parent) { unsigned int i; @@ -3377,12 +3377,12 @@ rsrc_parse_entries (bfd * abfd, } static bfd_byte * -rsrc_parse_directory (bfd * abfd, +rsrc_parse_directory (bfd * abfd, rsrc_directory * table, bfd_byte * datastart, bfd_byte * data, bfd_byte * dataend, - bfd_vma rva_bias, + bfd_vma rva_bias, rsrc_entry * entry) { bfd_byte * highest_data = data; @@ -3433,14 +3433,14 @@ rsrc_write_string (rsrc_write_data * data, static inline unsigned int rsrc_compute_rva (rsrc_write_data * data, - bfd_byte * addr) + bfd_byte * addr) { return (addr - data->datastart) + data->rva_bias; } static void rsrc_write_leaf (rsrc_write_data * data, - rsrc_leaf * leaf) + rsrc_leaf * leaf) { bfd_put_32 (data->abfd, rsrc_compute_rva (data, data->next_data), data->next_leaf); @@ -3459,8 +3459,8 @@ static void rsrc_write_directory (rsrc_write_data *, rsrc_directory *); static void rsrc_write_entry (rsrc_write_data * data, - bfd_byte * where, - rsrc_entry * entry) + bfd_byte * where, + rsrc_entry * entry) { if (entry->is_name) { @@ -3588,19 +3588,19 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n) if (c < 0xdc00) { if (n >= 2) - { - if (s[1] >= 0xdc00 && s[1] < 0xe000) - { - *puc = 0x10000 + ((c - 0xd800) << 10) + (s[1] - 0xdc00); - return 2; - } - } + { + if (s[1] >= 0xdc00 && s[1] < 0xe000) + { + *puc = 0x10000 + ((c - 0xd800) << 10) + (s[1] - 0xdc00); + return 2; + } + } else - { - /* Incomplete multibyte character. */ - *puc = 0xfffd; - return n; - } + { + /* Incomplete multibyte character. */ + *puc = 0xfffd; + return n; + } } /* Invalid multibyte character. */ @@ -3725,7 +3725,7 @@ rsrc_resource_name (rsrc_entry * entry, rsrc_directory * dir) case 1: strcat (buffer, " (CURSOR)"); break; case 2: strcat (buffer, " (BITMAP)"); break; case 3: strcat (buffer, " (ICON)"); break; - case 4: strcat (buffer, " (MENU)"); break; + case 4: strcat (buffer, " (MENU)"); break; case 5: strcat (buffer, " (DIALOG)"); break; case 6: strcat (buffer, " (STRING)"); is_string = TRUE; break; case 7: strcat (buffer, " (FONTDIR)"); break; @@ -4133,22 +4133,22 @@ rsrc_process_section (bfd * abfd, struct coff_final_link_info * pfinfo) { rsrc_directory new_table; - bfd_size_type size; - asection * sec; + bfd_size_type size; + asection * sec; pe_data_type * pe; - bfd_vma rva_bias; - bfd_byte * data; - bfd_byte * datastart; - bfd_byte * dataend; - bfd_byte * new_data; - unsigned int num_resource_sets; + bfd_vma rva_bias; + bfd_byte * data; + bfd_byte * datastart; + bfd_byte * dataend; + bfd_byte * new_data; + unsigned int num_resource_sets; rsrc_directory * type_tables; rsrc_write_data write_data; - unsigned int indx; - bfd * input; - unsigned int num_input_rsrc = 0; - unsigned int max_num_input_rsrc = 4; - ptrdiff_t * rsrc_sizes = NULL; + unsigned int indx; + bfd * input; + unsigned int num_input_rsrc = 0; + unsigned int max_num_input_rsrc = 4; + ptrdiff_t * rsrc_sizes = NULL; new_table.names.num_entries = 0; new_table.ids.num_entries = 0; @@ -4277,9 +4277,9 @@ rsrc_process_section (bfd * abfd, /* FIXME: Should we verify that all type tables are the same ? */ new_table.characteristics = type_tables[0].characteristics; - new_table.time = type_tables[0].time; - new_table.major = type_tables[0].major; - new_table.minor = type_tables[0].minor; + new_table.time = type_tables[0].time; + new_table.major = type_tables[0].major; + new_table.minor = type_tables[0].minor; /* Chain the NAME entries onto the table. */ new_table.names.first_entry = NULL; @@ -4313,13 +4313,13 @@ rsrc_process_section (bfd * abfd, if (new_data == NULL) goto end; - write_data.abfd = abfd; - write_data.datastart = new_data; - write_data.next_table = new_data; - write_data.next_leaf = new_data + sizeof_tables_and_entries; + write_data.abfd = abfd; + write_data.datastart = new_data; + write_data.next_table = new_data; + write_data.next_leaf = new_data + sizeof_tables_and_entries; write_data.next_string = write_data.next_leaf + sizeof_leaves; - write_data.next_data = write_data.next_string + sizeof_strings; - write_data.rva_bias = sec->vma - pe->pe_opthdr.ImageBase; + write_data.next_data = write_data.next_string + sizeof_strings; + write_data.rva_bias = sec->vma - pe->pe_opthdr.ImageBase; rsrc_write_directory (& write_data, & new_table); @@ -4398,7 +4398,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) } /* The import address table. This is the size/address of - .idata$5. */ + .idata$5. */ h1 = coff_link_hash_lookup (coff_hash_table (info), ".idata$5", FALSE, FALSE, TRUE); if (h1 != NULL @@ -4479,7 +4479,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) " because .idata$6 is missing"), abfd); result = FALSE; } - } + } } h1 = coff_link_hash_lookup (coff_hash_table (info), |