This commit is contained in:
parent
8fa4ac1dc6
commit
09673de3ff
@ -1,68 +0,0 @@
|
|||||||
PR ld/12451
|
|
||||||
* elfcode.h (elf_checksum_contents): Read in the section's
|
|
||||||
contents if they are not already available.
|
|
||||||
* compress.c (bfd_get_full_section_contents): Use zmalloc to
|
|
||||||
allocate the buffers so that excess bytes are guaranteed to be
|
|
||||||
zero.
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/bfd/elfcode.h,v
|
|
||||||
retrieving revision 1.109
|
|
||||||
retrieving revision 1.110
|
|
||||||
diff -u -r1.109 -r1.110
|
|
||||||
--- src/bfd/elfcode.h 2011/06/06 01:26:01 1.109
|
|
||||||
+++ src/bfd/elfcode.h 2011/12/14 11:50:13 1.110
|
|
||||||
@@ -1097,8 +1097,28 @@
|
|
||||||
elf_swap_shdr_out (abfd, &i_shdr, &x_shdr);
|
|
||||||
(*process) (&x_shdr, sizeof x_shdr, arg);
|
|
||||||
|
|
||||||
+ /* PR ld/12451:
|
|
||||||
+ Process the section's contents; reading them in if necessary. */
|
|
||||||
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;
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/bfd/compress.c,v
|
|
||||||
retrieving revision 1.9
|
|
||||||
retrieving revision 1.10
|
|
||||||
diff -u -r1.9 -r1.10
|
|
||||||
--- src/bfd/compress.c 2011/04/11 04:08:12 1.9
|
|
||||||
+++ src/bfd/compress.c 2011/12/14 11:50:13 1.10
|
|
||||||
@@ -181,7 +181,7 @@
|
|
||||||
case COMPRESS_SECTION_NONE:
|
|
||||||
if (p == NULL)
|
|
||||||
{
|
|
||||||
- p = (bfd_byte *) bfd_malloc (sz);
|
|
||||||
+ p = (bfd_byte *) bfd_zmalloc (sz);
|
|
||||||
if (p == NULL)
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
@@ -221,7 +221,7 @@
|
|
||||||
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;
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
|||||||
PR gas/13449
|
|
||||||
* config/tc-arm.c (create_unwind_entry): Zero allocated table
|
|
||||||
entries.
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
|
|
||||||
retrieving revision 1.511
|
|
||||||
retrieving revision 1.512
|
|
||||||
diff -u -r1.511 -r1.512
|
|
||||||
--- src/gas/config/tc-arm.c 2011/12/07 16:58:34 1.511
|
|
||||||
+++ src/gas/config/tc-arm.c 2011/12/15 10:21:49 1.512
|
|
||||||
@@ -3540,6 +3540,7 @@
|
|
||||||
record_alignment (now_seg, 2);
|
|
||||||
|
|
||||||
ptr = frag_more (8);
|
|
||||||
+ memset (ptr, 0, 8);
|
|
||||||
where = frag_now_fix () - 8;
|
|
||||||
|
|
||||||
/* Self relative offset of the function start. */
|
|
||||||
@@ -19926,8 +19927,12 @@
|
|
||||||
size = unwind.opcode_count - 2;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
- /* An extra byte is required for the opcode count. */
|
|
||||||
- size = unwind.opcode_count + 1;
|
|
||||||
+ {
|
|
||||||
+ gas_assert (unwind.personality_index == -1);
|
|
||||||
+
|
|
||||||
+ /* An extra byte is required for the opcode count. */
|
|
||||||
+ size = unwind.opcode_count + 1;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
size = (size + 3) >> 2;
|
|
||||||
if (size > 0xff)
|
|
||||||
@@ -19953,7 +19958,7 @@
|
|
||||||
ptr += 4;
|
|
||||||
|
|
||||||
/* Set the first byte to the number of additional words. */
|
|
||||||
- data = size - 1;
|
|
||||||
+ data = size > 0 ? size - 1 : 0;
|
|
||||||
n = 3;
|
|
||||||
break;
|
|
||||||
|
|
||||||
===================================================================
|
|
||||||
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
|
|
||||||
retrieving revision 1.512
|
|
||||||
retrieving revision 1.513
|
|
||||||
diff -u -r1.512 -r1.513
|
|
||||||
--- src/gas/config/tc-arm.c 2011/12/15 10:21:49 1.512
|
|
||||||
+++ src/gas/config/tc-arm.c 2011/12/21 17:07:26 1.513
|
|
||||||
@@ -19944,6 +19944,8 @@
|
|
||||||
|
|
||||||
/* Allocate the table entry. */
|
|
||||||
ptr = frag_more ((size << 2) + 4);
|
|
||||||
+ /* PR 13449: Zero the table entries in case some of them are not used. */
|
|
||||||
+ memset (ptr, 0, (size << 2) + 4);
|
|
||||||
where = frag_now_fix () - ((size << 2) + 4);
|
|
||||||
|
|
||||||
switch (unwind.personality_index)
|
|
||||||
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
|||||||
MALLOC_PERTURB_ will make inval-equ-1.l fail, because with errors fixups aren't
|
|
||||||
run, which means the space for displacement operands remains uninitialized.
|
|
||||||
The testcase invalidly expects zeros there. See bnc #590820 .
|
|
||||||
|
|
||||||
--- gas/testsuite/gas/i386/inval-equ-1.l.mm 2008-03-03 15:28:58.000000000 +0000
|
|
||||||
+++ gas/testsuite/gas/i386/inval-equ-1.l 2010-03-24 16:16:30.000000000 +0000
|
|
||||||
@@ -9,6 +9,6 @@ GAS LISTING .*
|
|
||||||
[ ]*3[ ]+\.equ bar1,%eax
|
|
||||||
[ ]*4[ ]+\.equ bar2,%eax
|
|
||||||
[ ]*5[ ]+\.globl bar2
|
|
||||||
-[ ]*6[ ]+\?\?\?\? A1000000 mov bar1,%eax
|
|
||||||
-[ ]*6[ ]+00
|
|
||||||
-[ ]*7[ ]+\?\?\?\? 89C0 mov bar2,%eax
|
|
||||||
+[ ]*6[ ]+.*[ ]+mov bar1,%eax
|
|
||||||
+[ ]*6[ ]+.*
|
|
||||||
+[ ]*7[ ]+.*[ ]+mov bar2,%eax
|
|
||||||
--- gas/testsuite/gas/i386/inval-equ-2.l.mm 2008-03-03 15:28:58.000000000 +0000
|
|
||||||
+++ gas/testsuite/gas/i386/inval-equ-2.l 2010-03-24 16:18:05.000000000 +0000
|
|
||||||
@@ -7,13 +7,13 @@ GAS LISTING .*
|
|
||||||
|
|
||||||
[ ]*1[ ]+\.globl bar1
|
|
||||||
[ ]*2[ ]+\.set bar1,\(%eax\+1\)
|
|
||||||
-[ ]*3[ ]+\?\?\?\? A12A0000 mov bar1,%eax
|
|
||||||
-[ ]*3[ ]+00
|
|
||||||
+[ ]*3[ ]+.*[ ]+mov bar1,%eax
|
|
||||||
+[ ]*3[ ]+.*
|
|
||||||
[ ]*4[ ]+\.set bar2,\(%eax\+1\)
|
|
||||||
-[ ]*5[ ]+\?\?\?\? A12A0000 mov bar2,%eax
|
|
||||||
-[ ]*5[ ]+00
|
|
||||||
+[ ]*5[ ]+.*[ ]+mov bar2,%eax
|
|
||||||
+[ ]*5[ ]+.*
|
|
||||||
[ ]*6[ ]+\.globl bar2
|
|
||||||
[ ]*7[ ]+\.set bar3,\(%eax\+1\)
|
|
||||||
-[ ]*8[ ]+\?\?\?\? A12A0000 mov bar3,%eax
|
|
||||||
+[ ]*8[ ]+.*[ ]+mov bar3,%eax
|
|
||||||
\*\*\*\* Error:can't make global register symbol `bar3'
|
|
||||||
-[ ]*8[ ]+00
|
|
||||||
+[ ]*8[ ]+.*
|
|
Loading…
Reference in New Issue
Block a user