diff options
author | Yuanhui Zhang <asmwarrior@gmail.com> | 2014-04-22 11:00:39 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-04-22 11:00:39 +0100 |
commit | 285fc9d8f8ed30b8a9d680fbf37e8f1843b95bc0 (patch) | |
tree | 53eded0b72d43e6435bc7523d55085e160272d82 | |
parent | 5d3b02f0036dbf39863fd24414e28f28a53ea1fd (diff) | |
download | gdb-285fc9d8f8ed30b8a9d680fbf37e8f1843b95bc0.zip gdb-285fc9d8f8ed30b8a9d680fbf37e8f1843b95bc0.tar.gz gdb-285fc9d8f8ed30b8a9d680fbf37e8f1843b95bc0.tar.bz2 |
Fix build problem on 32-bit hosts with the recent patch for PR 16821.
PR ld/16821
* peXXigen.c (abs_finder): Fix for 32-bit host builds.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/peXXigen.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b898da8..56c80cc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2014-04-22 Yuanhui Zhang <asmwarrior@gmail.com> + + PR ld/16821 + * peXXigen.c (abs_finder): Fix for 32-bit host builds. + 2014-04-22 Will Newton <will.newton@linaro.org> * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 36d90cc..56224a8 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -212,7 +212,7 @@ abs_finder (bfd * abfd ATTRIBUTE_UNUSED, asection * sec, void * data) { bfd_vma abs_val = * (bfd_vma *) data; - return (sec->vma <= abs_val) && ((sec->vma + (1L << 32)) > abs_val); + return (sec->vma <= abs_val) && ((sec->vma + (1LL << 32)) > abs_val); } unsigned int @@ -3591,6 +3591,7 @@ rsrc_sort_entries (rsrc_dir_chain * chain, /* Unhook NEXT from the chain. */ /* FIXME: memory loss here. */ + /* FIXME: do we need to decrement sizeof_tables_and_entries ? */ entry->next_entry = next->next_entry; chain->num_entries --; if (chain->num_entries < 2) @@ -3654,6 +3655,7 @@ rsrc_sort_entries (rsrc_dir_chain * chain, } /* Unhook NEXT from the chain. */ + /* FIXME: do we need to decrement sizeof_tables_and_entries ? */ entry->next_entry = next->next_entry; chain->num_entries --; if (chain->num_entries < 2) @@ -3914,6 +3916,12 @@ rsrc_process_section (bfd * abfd, if (new_data == NULL) goto end; + /* We have merged the top level Type Tables of all of the input + .rsrc sections into one Type Table. So we can (and must) + reduce the count of the number of tables that we will be + emitting appropriately. */ + sizeof_tables_and_entries -= 16 * (num_resource_sets - 1); + write_data.abfd = abfd; write_data.datastart = new_data; write_data.next_table = new_data; |