From f0b886e312147c9e1b063bedcf35fc8eb839cb46 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 5 Jun 2008 17:29:44 +0000 Subject: [PATCH] PR 6584 * binary.cc (Binary_to_elf::sized_convert): Fix .data alignment. --- gold/ChangeLog | 6 ++++++ gold/binary.cc | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 74eb045f570..f534b6dac54 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2008-06-05 Kris Van Hees + + PR 6584 + * binary.cc (Binary_to_elf::sized_convert): Fix .data + alignment. + 2008-05-30 Cary Coutant * archive.cc (Archive::include_all_members) Correct to step diff --git a/gold/binary.cc b/gold/binary.cc index bee5157f9b0..7eb7223e536 100644 --- a/gold/binary.cc +++ b/gold/binary.cc @@ -198,16 +198,16 @@ Binary_to_elf::sized_convert(const Task* task) this->write_section_header("", &shstrtab, elfcpp::SHT_NULL, 0, 0, 0, 0, 0, 0, 0, &pout); - // Having the section be named ".data" and having it be writable is - // because th GNU linker does it that way, and existing linker - // script expect it. + // Having the section be named ".data", having it be writable, and + // giving it an alignment of 1 is because the GNU linker does it + // that way, and existing linker script expect it. this->write_section_header(".data", &shstrtab, elfcpp::SHT_PROGBITS, (elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE), data_offset, filesize, 0, 0, - align, 0, &pout); + 1, 0, &pout); this->write_section_header(".symtab", &shstrtab, elfcpp::SHT_SYMTAB, 0, symtab_offset, 4 * sym_size, -- 2.30.2