diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0019-PR-ld-13468.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/0019-PR-ld-13468.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0019-PR-ld-13468.patch b/meta/recipes-devtools/binutils/binutils/0019-PR-ld-13468.patch new file mode 100644 index 0000000000..79d9f48453 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0019-PR-ld-13468.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From 4c362e4511c4046e230fc9e330bf086753f04338 Mon Sep 17 00:00:00 2001 | ||
4 | From: Alan Modra <amodra@bigpond.net.au> | ||
5 | Date: Sat, 3 Dec 2011 10:29:17 +0000 | ||
6 | Subject: [PATCH 019/262] PR ld/13468 * elflink.c | ||
7 | (bfd_elf_final_link): Don't segfault when checking | ||
8 | for DT_TEXTREL and .dynamic does not exist. | ||
9 | |||
10 | --- | ||
11 | bfd/ChangeLog | 6 ++++++ | ||
12 | bfd/elflink.c | 9 +++------ | ||
13 | 2 files changed, 9 insertions(+), 6 deletions(-) | ||
14 | |||
15 | 2011-12-03 Alan Modra <amodra@gmail.com> | ||
16 | |||
17 | PR ld/13468 | ||
18 | * elflink.c (bfd_elf_final_link): Don't segfault when checking | ||
19 | for DT_TEXTREL and .dynamic does not exist. | ||
20 | |||
21 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
22 | index fc4266b..8556cec 100644 | ||
23 | --- a/bfd/elflink.c | ||
24 | +++ b/bfd/elflink.c | ||
25 | @@ -11188,15 +11188,12 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) | ||
26 | goto error_return; | ||
27 | |||
28 | /* Check for DT_TEXTREL (late, in case the backend removes it). */ | ||
29 | - if ((info->warn_shared_textrel && info->shared) | ||
30 | - || info->error_textrel) | ||
31 | + if (((info->warn_shared_textrel && info->shared) | ||
32 | + || info->error_textrel) | ||
33 | + && (o = bfd_get_section_by_name (dynobj, ".dynamic")) != NULL) | ||
34 | { | ||
35 | bfd_byte *dyncon, *dynconend; | ||
36 | |||
37 | - /* Fix up .dynamic entries. */ | ||
38 | - o = bfd_get_section_by_name (dynobj, ".dynamic"); | ||
39 | - BFD_ASSERT (o != NULL); | ||
40 | - | ||
41 | dyncon = o->contents; | ||
42 | dynconend = o->contents + o->size; | ||
43 | for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn) | ||
44 | -- | ||
45 | 1.7.9.5 | ||
46 | |||