• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch
Max FilippovMax Filippov committed 0dd180ec19010 Jul 2014
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2 Mon Sep 17 00:00:00 2001
2
From: Max Filippov <jcmvbkbc@gmail.com>
3
Date: Thu, 10 Jul 2014 01:47:33 +0400
4
Subject: [PATCH] Fix xtensa ld segfault when linking linux modules
5
​
6
is_inconsistent_linkonce_section makes an assumption that section name
7
that starts with ".gnu.linkonce.prop." has one more dot in its suffix.
8
However gas generates such section name by insertion of "prop." right
9
after ".gnu.linkonce." part of the name of the original section. So, for
10
section named ".gnu.linkonce.this_module" corresponding property section
11
name does not satisfy the assumption. Such section names are common in
12
linux modules. This bug was exposed by the patch "a35d5e8 Fix alignment
13
for the first section frag on xtensa", that makes gas produce property
14
section for each section that has ".align" directive in it.
15
​
16
Use suffix that immediately follows ".gnu.linkonce.prop." when there are
17
no more dots following it.
18
​
19
2014-07-10  Max Filippov  <jcmvbkbc@gmail.com>
20
​
21
ld/
22
    * emultempl/xtensaelf.em (is_inconsistent_linkonce_section):
23
    correctly handle missing dot in section name after
24
    ".gnu.linkonce.prop.".
25
---
26
Backported from: e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2
27
Changes to ld/ChangeLog file are dropped.
28
​
29
 ld/emultempl/xtensaelf.em | 2 +-
30
 1 file changed, 1 insertion(+), 1 deletion(-)
31
​
32
diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
33
index 151eea4..948d18d 100644
34
--- a/ld/emultempl/xtensaelf.em
35
+++ b/ld/emultempl/xtensaelf.em
36
@@ -1310,7 +1310,7 @@ is_inconsistent_linkonce_section (asection *sec)
37
      for Tensilica's XCC compiler.  */
38
   name = sec_name + linkonce_len;
39
   if (CONST_STRNEQ (name, "prop."))
40
-    name = strchr (name + 5, '.') + 1;
41
+    name = strchr (name + 5, '.') ? strchr (name + 5, '.') + 1 : name + 5;
42
   else if (name[1] == '.'
43
       && (name[0] == 'p' || name[0] == 'e' || name[0] == 'h'))
44
     name += 2;
45
-- 
46
1.8.1.4
47
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.