https://sourceware.org/bugzilla/show_bug.cgi?id=19572
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Nick Clifton from comment #1) > Created attachment 9037 [details] > Add check of segment addresses > > Hi H.J. > > Please could you try out this patch and let me know if it works for you. > > Cheers > Nick + if (bfd_arch_bits_per_address (link_info.output_bfd) < (sizeof (bfd_vma) * 8)) + { It doesn't work for x32 which has has 64-bit arch address and 32-bit pointer. + segment_type * seg; + bfd_vma max = ((bfd_vma) 1) << bfd_arch_bits_per_address (link_info.output_bfd); + + for (seg = segments; seg; seg = seg->next) + if (seg->value >= max) + einfo (_("%P%X: Segment %s address %V is bigger than maximum address %V\n"), + seg->name, seg->value, max - 1); + } -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils