This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 8651a91bc08545a2210385399bbef223cea51262 Mon Sep 17 00:00:00 2001 | |
From: Peng Fan <van.freenix@gmail.com> | |
Date: Thu, 25 Apr 2013 19:03:42 +0800 | |
Subject: [PATCH 2/3] abs32 for arm | |
--- | |
rtems.py | 11 ++++++++--- | |
rtl-mdreloc-arm.c | 6 +++--- | |
x-long-name-to-create-gnu-extension-in-archive.c | 6 ------ | |
xa.c | 3 ++- | |
4 files changed, 13 insertions(+), 13 deletions(-) | |
diff --git a/rtems.py b/rtems.py | |
index e8b1c25..72d6051 100644 | |
--- a/rtems.py | |
+++ b/rtems.py | |
@@ -9,9 +9,7 @@ import pkgconfig | |
import re | |
import subprocess | |
-#freenix | |
-default_version = '4.10' | |
-#default_version = '4.11' | |
+default_version = '4.11' | |
default_label = 'rtems-' + default_version | |
default_path = '/opt/' + default_label | |
default_postfix = 'rtems' + default_version | |
@@ -390,6 +388,9 @@ def _find_installed_archs(config, path, version): | |
for d in os.listdir(path): | |
if d.endswith('-rtems' + version): | |
archs += [d] | |
+ for d in os.listdir(path): | |
+ if d.endswith('-rtemseabi' + version): | |
+ archs += [d] | |
else: | |
a = subprocess.check_output([config, '--list-format', '"%(arch)s"']) | |
a = a[:-1].replace('"', '') | |
@@ -405,6 +406,10 @@ def _check_archs(config, req, path, version): | |
arch = a + '-rtems' + version | |
if arch in installed: | |
archs += [arch] | |
+ for a in req.split(','): | |
+ arch = a + '-rtemseabi' + version | |
+ if arch in installed: | |
+ archs += [arch] | |
archs.sort() | |
return archs | |
diff --git a/rtl-mdreloc-arm.c b/rtl-mdreloc-arm.c | |
index f31d1ef..f3f2680 100644 | |
--- a/rtl-mdreloc-arm.c | |
+++ b/rtl-mdreloc-arm.c | |
@@ -144,10 +144,10 @@ rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj, | |
#endif | |
#endif | |
- case R_TYPE(ABS32): /* word32 B + S + A */ | |
- case R_TYPE(GLOB_DAT): /* word32 B + S */ | |
+ case R_TYPE(ABS32): /* word32 (S + A) | T */ | |
+ case R_TYPE(GLOB_DAT): /* word32 (S + A) | T */ | |
if (__predict_true(RELOC_ALIGNED_P(where))) { | |
- tmp = *where + (Elf_Addr)sect->base + symvalue; | |
+ tmp = *where + symvalue; /* S + A*/ | |
/* Set the Thumb bit, if needed. */ | |
if (ELF_ST_TYPE(syminfo) == STT_ARM_TFUNC) | |
tmp |= 1; | |
diff --git a/x-long-name-to-create-gnu-extension-in-archive.c b/x-long-name-to-create-gnu-extension-in-archive.c | |
index c0e764d..4c53d72 100644 | |
--- a/x-long-name-to-create-gnu-extension-in-archive.c | |
+++ b/x-long-name-to-create-gnu-extension-in-archive.c | |
@@ -42,12 +42,6 @@ z_writeln(int argc, const char* argv[]) | |
return 123; | |
} | |
-void | |
-test_led(void) | |
-{ | |
- led_on(); | |
-} | |
- | |
int | |
my_main (int argc, char* argv[]) | |
{ | |
diff --git a/xa.c b/xa.c | |
index f6e7f81..8a358e9 100644 | |
--- a/xa.c | |
+++ b/xa.c | |
@@ -12,7 +12,8 @@ hello (void) | |
int rtems(int argc, char **argv) | |
{ | |
- test_led(); | |
+ hello(); | |
+ printf("rtems\n"); | |
#if 0 | |
*(volatile unsigned int *)0x7F008800 = 0x11110000; | |
*(volatile unsigned int *)0x7F008808 = ~(0xf<<4); | |
-- | |
1.7.10.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment