- Rebase on 2.22.52 release.

- Remove build-id.patch and gold-casts.patch as they are included in the 2.22.52 sources.
This commit is contained in:
Nick Clifton 2012-02-01 16:49:34 +00:00
parent 1695c639cf
commit 8e8dc3d383
3 changed files with 8 additions and 333 deletions

View File

@ -1,47 +0,0 @@
--- bfd/compress.c.jj 2010-12-24 11:40:19.000000000 +0100
+++ bfd/compress.c 2011-01-28 15:40:19.869777126 +0100
@@ -174,7 +174,7 @@ bfd_get_full_section_contents (bfd *abfd
case COMPRESS_SECTION_NONE:
if (p == NULL)
{
- p = (bfd_byte *) bfd_malloc (sz);
+ p = (bfd_byte *) bfd_zmalloc (sz);
if (p == NULL)
return FALSE;
}
@@ -214,7 +214,7 @@ bfd_get_full_section_contents (bfd *abfd
if (!ret)
goto fail_compressed;
- uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size);
+ uncompressed_buffer = (bfd_byte *) bfd_zmalloc (uncompressed_size);
if (uncompressed_buffer == NULL)
goto fail_compressed;
--- bfd/elfcode.h.jj 2010-12-31 03:43:21.000000000 +0100
+++ bfd/elfcode.h 2011-01-28 15:34:39.055388479 +0100
@@ -1158,6 +1158,24 @@ elf_checksum_contents (bfd *abfd,
if (i_shdr.contents)
(*process) (i_shdr.contents, i_shdr.sh_size, arg);
+ else
+ {
+ asection *sec;
+
+ sec = bfd_section_from_elf_index (abfd, count);
+ if (sec != NULL)
+ {
+ if (sec->contents == NULL)
+ {
+ /* Force rereading from file. */
+ sec->flags &= ~SEC_IN_MEMORY;
+ if (! bfd_malloc_and_get_section (abfd, sec, & sec->contents))
+ continue;
+ }
+ if (sec->contents != NULL)
+ (*process) (sec->contents, i_shdr.sh_size, arg);
+ }
+ }
}
return TRUE;

View File

@ -1,278 +0,0 @@
diff -cp ../binutils-2.22.orig/gold/dwarf_reader.cc gold/dwarf_reader.cc
*** ../binutils-2.22.orig/gold/dwarf_reader.cc 2012-01-13 12:20:00.279690374 +0000
--- gold/dwarf_reader.cc 2012-01-13 12:31:15.659709094 +0000
*************** Sized_dwarf_line_info<size, big_endian>:
*** 491,498 ****
&& (shndx == -1U || lsm.shndx == -1U || shndx == lsm.shndx))
{
Offset_to_lineno_entry entry
! = { lsm.address, this->current_header_index_,
! lsm.file_num, true, lsm.line_num };
std::vector<Offset_to_lineno_entry>&
map(this->line_number_map_[lsm.shndx]);
// If we see two consecutive entries with the same
--- 491,498 ----
&& (shndx == -1U || lsm.shndx == -1U || shndx == lsm.shndx))
{
Offset_to_lineno_entry entry
! = { (off_t) lsm.address, this->current_header_index_,
! (unsigned int) lsm.file_num, true, lsm.line_num };
std::vector<Offset_to_lineno_entry>&
map(this->line_number_map_[lsm.shndx]);
// If we see two consecutive entries with the same
diff -cp ../binutils-2.22.orig/gold/i386.cc gold/i386.cc
*** ../binutils-2.22.orig/gold/i386.cc 2012-01-13 12:20:00.355690373 +0000
--- gold/i386.cc 2012-01-13 12:31:15.662709094 +0000
*************** Target_i386::do_code_fill(section_size_t
*** 3480,3529 ****
}
// Nop sequences of various lengths.
! const char nop1[1] = { 0x90 }; // nop
! const char nop2[2] = { 0x66, 0x90 }; // xchg %ax %ax
! const char nop3[3] = { 0x8d, 0x76, 0x00 }; // leal 0(%esi),%esi
! const char nop4[4] = { 0x8d, 0x74, 0x26, 0x00}; // leal 0(%esi,1),%esi
! const char nop5[5] = { 0x90, 0x8d, 0x74, 0x26, // nop
0x00 }; // leal 0(%esi,1),%esi
! const char nop6[6] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
0x00, 0x00 };
! const char nop7[7] = { 0x8d, 0xb4, 0x26, 0x00, // leal 0L(%esi,1),%esi
0x00, 0x00, 0x00 };
! const char nop8[8] = { 0x90, 0x8d, 0xb4, 0x26, // nop
0x00, 0x00, 0x00, 0x00 }; // leal 0L(%esi,1),%esi
! const char nop9[9] = { 0x89, 0xf6, 0x8d, 0xbc, // movl %esi,%esi
0x27, 0x00, 0x00, 0x00, // leal 0L(%edi,1),%edi
0x00 };
! const char nop10[10] = { 0x8d, 0x76, 0x00, 0x8d, // leal 0(%esi),%esi
0xbc, 0x27, 0x00, 0x00, // leal 0L(%edi,1),%edi
0x00, 0x00 };
! const char nop11[11] = { 0x8d, 0x74, 0x26, 0x00, // leal 0(%esi,1),%esi
0x8d, 0xbc, 0x27, 0x00, // leal 0L(%edi,1),%edi
0x00, 0x00, 0x00 };
! const char nop12[12] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
0x00, 0x00, 0x8d, 0xbf, // leal 0L(%edi),%edi
0x00, 0x00, 0x00, 0x00 };
! const char nop13[13] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
0x00, 0x00, 0x8d, 0xbc, // leal 0L(%edi,1),%edi
0x27, 0x00, 0x00, 0x00,
0x00 };
! const char nop14[14] = { 0x8d, 0xb4, 0x26, 0x00, // leal 0L(%esi,1),%esi
0x00, 0x00, 0x00, 0x8d, // leal 0L(%edi,1),%edi
0xbc, 0x27, 0x00, 0x00,
0x00, 0x00 };
! const char nop15[15] = { 0xeb, 0x0d, 0x90, 0x90, // jmp .+15
0x90, 0x90, 0x90, 0x90, // nop,nop,nop,...
0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90 };
! const char* nops[16] = {
NULL,
nop1, nop2, nop3, nop4, nop5, nop6, nop7,
nop8, nop9, nop10, nop11, nop12, nop13, nop14, nop15
};
! return std::string(nops[length], length);
}
// Return the value to use for the base of a DW_EH_PE_datarel offset
--- 3480,3529 ----
}
// Nop sequences of various lengths.
! const unsigned char nop1[1] = { 0x90 }; // nop
! const unsigned char nop2[2] = { 0x66, 0x90 }; // xchg %ax %ax
! const unsigned char nop3[3] = { 0x8d, 0x76, 0x00 }; // leal 0(%esi),%esi
! const unsigned char nop4[4] = { 0x8d, 0x74, 0x26, 0x00}; // leal 0(%esi,1),%esi
! const unsigned char nop5[5] = { 0x90, 0x8d, 0x74, 0x26, // nop
0x00 }; // leal 0(%esi,1),%esi
! const unsigned char nop6[6] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
0x00, 0x00 };
! const unsigned char nop7[7] = { 0x8d, 0xb4, 0x26, 0x00, // leal 0L(%esi,1),%esi
0x00, 0x00, 0x00 };
! const unsigned char nop8[8] = { 0x90, 0x8d, 0xb4, 0x26, // nop
0x00, 0x00, 0x00, 0x00 }; // leal 0L(%esi,1),%esi
! const unsigned char nop9[9] = { 0x89, 0xf6, 0x8d, 0xbc, // movl %esi,%esi
0x27, 0x00, 0x00, 0x00, // leal 0L(%edi,1),%edi
0x00 };
! const unsigned char nop10[10] = { 0x8d, 0x76, 0x00, 0x8d, // leal 0(%esi),%esi
0xbc, 0x27, 0x00, 0x00, // leal 0L(%edi,1),%edi
0x00, 0x00 };
! const unsigned char nop11[11] = { 0x8d, 0x74, 0x26, 0x00, // leal 0(%esi,1),%esi
0x8d, 0xbc, 0x27, 0x00, // leal 0L(%edi,1),%edi
0x00, 0x00, 0x00 };
! const unsigned char nop12[12] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
0x00, 0x00, 0x8d, 0xbf, // leal 0L(%edi),%edi
0x00, 0x00, 0x00, 0x00 };
! const unsigned char nop13[13] = { 0x8d, 0xb6, 0x00, 0x00, // leal 0L(%esi),%esi
0x00, 0x00, 0x8d, 0xbc, // leal 0L(%edi,1),%edi
0x27, 0x00, 0x00, 0x00,
0x00 };
! const unsigned char nop14[14] = { 0x8d, 0xb4, 0x26, 0x00, // leal 0L(%esi,1),%esi
0x00, 0x00, 0x00, 0x8d, // leal 0L(%edi,1),%edi
0xbc, 0x27, 0x00, 0x00,
0x00, 0x00 };
! const unsigned char nop15[15] = { 0xeb, 0x0d, 0x90, 0x90, // jmp .+15
0x90, 0x90, 0x90, 0x90, // nop,nop,nop,...
0x90, 0x90, 0x90, 0x90,
0x90, 0x90, 0x90 };
! const unsigned char* nops[16] = {
NULL,
nop1, nop2, nop3, nop4, nop5, nop6, nop7,
nop8, nop9, nop10, nop11, nop12, nop13, nop14, nop15
};
! return std::string((const char *) nops[length], length);
}
// Return the value to use for the base of a DW_EH_PE_datarel offset
diff -cp ../binutils-2.22.orig/gold/options.cc gold/options.cc
*** ../binutils-2.22.orig/gold/options.cc 2012-01-13 12:20:00.314690375 +0000
--- gold/options.cc 2012-01-13 13:59:36.972856052 +0000
*************** parse_uint(const char* option_name, cons
*** 198,204 ****
{
char* endptr;
*retval = strtol(arg, &endptr, 0);
! if (*endptr != '\0' || retval < 0)
gold_fatal(_("%s: invalid option value (expected an integer): %s"),
option_name, arg);
}
--- 198,204 ----
{
char* endptr;
*retval = strtol(arg, &endptr, 0);
! if (*endptr != '\0' || *retval < 0)
gold_fatal(_("%s: invalid option value (expected an integer): %s"),
option_name, arg);
}
diff -cp ../binutils-2.22.orig/gold/resolve.cc gold/resolve.cc
*** ../binutils-2.22.orig/gold/resolve.cc 2012-01-13 12:20:00.288690373 +0000
--- gold/resolve.cc 2012-01-13 12:31:15.663709095 +0000
*************** Symbol_table::resolve(Sized_symbol<size>
*** 336,344 ****
&& to->name()[0] == '_' && to->name()[1] == 'Z')
{
Symbol_location fromloc
! = { object, orig_st_shndx, sym.get_st_value() };
Symbol_location toloc = { to->object(), to->shndx(&to_is_ordinary),
! to->value() };
this->candidate_odr_violations_[to->name()].insert(fromloc);
this->candidate_odr_violations_[to->name()].insert(toloc);
}
--- 336,344 ----
&& to->name()[0] == '_' && to->name()[1] == 'Z')
{
Symbol_location fromloc
! = { object, orig_st_shndx, (off_t) sym.get_st_value() };
Symbol_location toloc = { to->object(), to->shndx(&to_is_ordinary),
! (off_t) to->value() };
this->candidate_odr_violations_[to->name()].insert(fromloc);
this->candidate_odr_violations_[to->name()].insert(toloc);
}
diff -cp ../binutils-2.22.orig/gold/x86_64.cc gold/x86_64.cc
*** ../binutils-2.22.orig/gold/x86_64.cc 2012-01-13 12:21:24.880692697 +0000
--- gold/x86_64.cc 2012-01-13 12:31:15.666709095 +0000
*************** Target_x86_64::do_code_fill(section_size
*** 3867,3916 ****
}
// Nop sequences of various lengths.
! const char nop1[1] = { 0x90 }; // nop
! const char nop2[2] = { 0x66, 0x90 }; // xchg %ax %ax
! const char nop3[3] = { 0x0f, 0x1f, 0x00 }; // nop (%rax)
! const char nop4[4] = { 0x0f, 0x1f, 0x40, 0x00}; // nop 0(%rax)
! const char nop5[5] = { 0x0f, 0x1f, 0x44, 0x00, // nop 0(%rax,%rax,1)
0x00 };
! const char nop6[6] = { 0x66, 0x0f, 0x1f, 0x44, // nopw 0(%rax,%rax,1)
0x00, 0x00 };
! const char nop7[7] = { 0x0f, 0x1f, 0x80, 0x00, // nopl 0L(%rax)
0x00, 0x00, 0x00 };
! const char nop8[8] = { 0x0f, 0x1f, 0x84, 0x00, // nopl 0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00 };
! const char nop9[9] = { 0x66, 0x0f, 0x1f, 0x84, // nopw 0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00,
0x00 };
! const char nop10[10] = { 0x66, 0x2e, 0x0f, 0x1f, // nopw %cs:0L(%rax,%rax,1)
0x84, 0x00, 0x00, 0x00,
0x00, 0x00 };
! const char nop11[11] = { 0x66, 0x66, 0x2e, 0x0f, // data16
0x1f, 0x84, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00 };
! const char nop12[12] = { 0x66, 0x66, 0x66, 0x2e, // data16; data16
0x0f, 0x1f, 0x84, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00 };
! const char nop13[13] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
0x2e, 0x0f, 0x1f, 0x84, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00,
0x00 };
! const char nop14[14] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
0x66, 0x2e, 0x0f, 0x1f, // data16
0x84, 0x00, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00 };
! const char nop15[15] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
0x66, 0x66, 0x2e, 0x0f, // data16; data16
0x1f, 0x84, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00 };
! const char* nops[16] = {
NULL,
nop1, nop2, nop3, nop4, nop5, nop6, nop7,
nop8, nop9, nop10, nop11, nop12, nop13, nop14, nop15
};
! return std::string(nops[length], length);
}
// Return the addend to use for a target specific relocation. The
--- 3867,3916 ----
}
// Nop sequences of various lengths.
! const unsigned char nop1[1] = { 0x90 }; // nop
! const unsigned char nop2[2] = { 0x66, 0x90 }; // xchg %ax %ax
! const unsigned char nop3[3] = { 0x0f, 0x1f, 0x00 }; // nop (%rax)
! const unsigned char nop4[4] = { 0x0f, 0x1f, 0x40, 0x00}; // nop 0(%rax)
! const unsigned char nop5[5] = { 0x0f, 0x1f, 0x44, 0x00, // nop 0(%rax,%rax,1)
0x00 };
! const unsigned char nop6[6] = { 0x66, 0x0f, 0x1f, 0x44, // nopw 0(%rax,%rax,1)
0x00, 0x00 };
! const unsigned char nop7[7] = { 0x0f, 0x1f, 0x80, 0x00, // nopl 0L(%rax)
0x00, 0x00, 0x00 };
! const unsigned char nop8[8] = { 0x0f, 0x1f, 0x84, 0x00, // nopl 0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00 };
! const unsigned char nop9[9] = { 0x66, 0x0f, 0x1f, 0x84, // nopw 0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00,
0x00 };
! const unsigned char nop10[10] = { 0x66, 0x2e, 0x0f, 0x1f, // nopw %cs:0L(%rax,%rax,1)
0x84, 0x00, 0x00, 0x00,
0x00, 0x00 };
! const unsigned char nop11[11] = { 0x66, 0x66, 0x2e, 0x0f, // data16
0x1f, 0x84, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00 };
! const unsigned char nop12[12] = { 0x66, 0x66, 0x66, 0x2e, // data16; data16
0x0f, 0x1f, 0x84, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00 };
! const unsigned char nop13[13] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
0x2e, 0x0f, 0x1f, 0x84, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00, 0x00,
0x00 };
! const unsigned char nop14[14] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
0x66, 0x2e, 0x0f, 0x1f, // data16
0x84, 0x00, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00 };
! const unsigned char nop15[15] = { 0x66, 0x66, 0x66, 0x66, // data16; data16; data16
0x66, 0x66, 0x2e, 0x0f, // data16; data16
0x1f, 0x84, 0x00, 0x00, // nopw %cs:0L(%rax,%rax,1)
0x00, 0x00, 0x00 };
! const unsigned char* nops[16] = {
NULL,
nop1, nop2, nop3, nop4, nop5, nop6, nop7,
nop8, nop9, nop10, nop11, nop12, nop13, nop14, nop15
};
! return std::string((const char *) nops[length], length);
}
// Return the addend to use for a target specific relocation. The

View File

@ -16,16 +16,16 @@
Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.22
Release: 4%{?dist}
Version: 2.22.52.0.1
Release: 1%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
# Source: ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
Source: ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-%{version}.tar.bz2
# The ftp.kernel.org/pub/linux/devel/binutils/ page is (temporarily) unavailable
# so we use the GNU site instead.
Source: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
# Source: http://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.bz2
Source2: binutils-2.19.50.0.1-output-format.sed
Patch01: binutils-2.20.51.0.2-libtool-lib64.patch
Patch02: binutils-2.20.51.0.10-ppc64-pie.patch
@ -34,8 +34,6 @@ Patch04: binutils-2.20.51.0.2-version.patch
Patch05: binutils-2.20.51.0.2-set-long-long.patch
Patch06: binutils-2.20.51.0.10-copy-osabi.patch
Patch07: binutils-2.20.51.0.10-sec-merge-emit.patch
Patch08: binutils-2.20.51.0.2-build-id.patch
Patch09: binutils-2.22-gold-casts.patch
%define gold_arches %ix86 x86_64
@ -133,8 +131,6 @@ using libelf instead of BFD.
%patch05 -p0 -b .set-long-long~
%patch06 -p0 -b .copy-osabi~
%patch07 -p0 -b .sec-merge-emit~
%patch08 -p0 -b .build-id~
%patch09 -p0 -b .gold-cast~
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@ -429,6 +425,10 @@ exit 0
%endif # %{isnative}
%changelog
* Wed Feb 01 2012 Nick Clifton <nickc@redhat.com> - 2.22.52.0.1-1
- Rebase on 2.22.52 release.
- Remove build-id.patch and gold-casts.patch as they are included in the 2.22.52 sources.
* Fri Jan 13 2012 Nick Clifton <nickc@redhat.com> - 2.22-4
- Fix bug in GOLD sources parsing signed integers in command line options.