--- bfd/rs6000-core.c_orig 2015-10-16 13:07:20.000000000 -0500 +++ bfd/rs6000-core.c 2015-10-19 04:26:17.000000000 -0500 @@ -528,6 +528,7 @@ rs6000coff_core_p (bfd *abfd) file_ptr ldi_core; uint ldi_next; bfd_vma ldi_dataorg; + bfd_vma core_dataorg; /* Fields from new and old core structures. */ bfd_size_type c_datasize, c_vmregions; @@ -551,19 +552,27 @@ rs6000coff_core_p (bfd *abfd) /* .data section from executable. */ if (c_datasize) { + /* If Large Memory Model is used, then the .data segment should start from + BDATAORG which has been defined in the system header files. */ + + if (c_flag & CORE_BIGDATA) + core_dataorg = BDATAORG; + else + core_dataorg = CDATA_ADDR (c_datasize); + if (!make_bfd_asection (abfd, ".data", SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS, c_datasize, - (bfd_vma) CDATA_ADDR (c_datasize), + (bfd_vma) core_dataorg, c_data)) goto fail; } /* .data sections from loaded objects. */ if (proc64) - size = (int) ((LdInfo *) 0)->l64.ldinfo_filename; + size = (unsigned long) ((LdInfo *) 0)->l64.ldinfo_filename; else - size = (int) ((LdInfo *) 0)->l32.ldinfo_filename; + size = (unsigned long) ((LdInfo *) 0)->l32.ldinfo_filename; while (1) {