• 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/914-xtensa-fix-signedness-of-gas-relocations.patch
Max FilippovMax Filippov committed 7eafaa6f72b03 Feb 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 6c7c5c477ef9ccf2d2548cf2ac3cec9bd3c9c5b6 Mon Sep 17 00:00:00 2001
2
From: Max Filippov <jcmvbkbc@gmail.com>
3
Date: Tue, 2 Feb 2016 17:11:38 +0300
4
Subject: [PATCH] xtensa: fix signedness of gas relocations
5
​
6
Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation
7
offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations
8
substituted for BFD_RELOC_*. This made it impossible to encode arbitrary
9
8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc
10
directive. Revert this part and add test.
11
​
12
gas/
13
2016-02-03  Max Filippov  <jcmvbkbc@gmail.com>
14
    * config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF*
15
    substitutions for BFD_RELOC_* as unsigned.
16
​
17
gas/testsuite/
18
2016-02-03  Max Filippov  <jcmvbkbc@gmail.com>
19
    * gas/xtensa/all.exp: Add loc to list of xtensa tests.
20
    * gas/xtensa/loc.d: New file: loc test result patterns.
21
    * gas/xtensa/loc.s: New file: loc test.
22
​
23
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
24
---
25
 gas/config/tc-xtensa.c           |  6 +++---
26
 gas/testsuite/gas/xtensa/all.exp |  1 +
27
 gas/testsuite/gas/xtensa/loc.d   | 10 ++++++++++
28
 gas/testsuite/gas/xtensa/loc.s   |  7 +++++++
29
 4 files changed, 21 insertions(+), 3 deletions(-)
30
 create mode 100644 gas/testsuite/gas/xtensa/loc.d
31
 create mode 100644 gas/testsuite/gas/xtensa/loc.s
32
​
33
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
34
index a119871..36a06cc 100644
35
--- a/gas/config/tc-xtensa.c
36
+++ b/gas/config/tc-xtensa.c
37
@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
38
        {
39
        case BFD_RELOC_8:
40
          fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
41
-         fixP->fx_signed = 1;
42
+         fixP->fx_signed = 0;
43
          break;
44
        case BFD_RELOC_16:
45
          fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
46
-         fixP->fx_signed = 1;
47
+         fixP->fx_signed = 0;
48
          break;
49
        case BFD_RELOC_32:
50
          fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
51
-         fixP->fx_signed = 1;
52
+         fixP->fx_signed = 0;
53
          break;
54
        default:
55
          break;
56
diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp
57
index 31b725b..7ff7bd7 100644
58
--- a/gas/testsuite/gas/xtensa/all.exp
59
+++ b/gas/testsuite/gas/xtensa/all.exp
60
@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then {
61
     run_dump_test "trampoline"
62
     run_dump_test "first_frag_align"
63
     run_dump_test "auto-litpools"
  • 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.