Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2011-10-16 15:21:27 -0400
committerEugene Tarassov2011-10-16 15:21:27 -0400
commit2197c33a43c36bb7d44bb6c22bfc3d0533ef2fc2 (patch)
tree5b312b0cc747db14351652fdc18b7a5d0e552bf2
parent6186ad22443a0240db3920a2f8a38e95be3d7e2a (diff)
downloadorg.eclipse.tcf.agent-2197c33a43c36bb7d44bb6c22bfc3d0533ef2fc2.tar.gz
org.eclipse.tcf.agent-2197c33a43c36bb7d44bb6c22bfc3d0533ef2fc2.tar.xz
org.eclipse.tcf.agent-2197c33a43c36bb7d44bb6c22bfc3d0533ef2fc2.zip
TCF Agent: implemented extension point for DWARF relocations.
-rw-r--r--machine/elf-mdep.h24
-rw-r--r--server/server.vcproj4
-rw-r--r--services/dwarfreloc.c9
3 files changed, 29 insertions, 8 deletions
diff --git a/machine/elf-mdep.h b/machine/elf-mdep.h
new file mode 100644
index 00000000..775de5b3
--- /dev/null
+++ b/machine/elf-mdep.h
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and Eclipse Distribution License v1.0 which accompany this distribution.
+ * The Eclipse Public License is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ * You may elect to redistribute this code under either of these licenses.
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+
+#define elf_relocate elf_relocate_i386
+#include <machine/i386/elf-mdep.h>
+#undef elf_relocate
+
+static ElfRelocateFunc elf_relocate_funcs[] = {
+ { EM_386, elf_relocate_i386 },
+ { EM_NONE, NULL }
+};
diff --git a/server/server.vcproj b/server/server.vcproj
index b1a8ee35..afcbb7ae 100644
--- a/server/server.vcproj
+++ b/server/server.vcproj
@@ -546,6 +546,10 @@
RelativePath=".\machine\cpudefs-ext.h"
>
</File>
+ <File
+ RelativePath="..\machine\elf-mdep.h"
+ >
+ </File>
</Filter>
<Filter
Name="system"
diff --git a/services/dwarfreloc.c b/services/dwarfreloc.c
index e3d9e187..23377831 100644
--- a/services/dwarfreloc.c
+++ b/services/dwarfreloc.c
@@ -41,19 +41,12 @@ static U8_T sym_value = 0;
static void * data_buf = NULL;
static size_t data_size = 0;
-#define elf_relocate elf_relocate_i386
-#include <machine/i386/elf-mdep.h>
-#undef elf_relocate
-
typedef struct ElfRelocateFunc {
int machine;
void (*func)(void);
} ElfRelocateFunc;
-static ElfRelocateFunc elf_relocate_funcs[] = {
- { EM_386, elf_relocate_i386 },
- { EM_NONE, NULL }
-};
+#include <machine/elf-mdep.h>
static void relocate(void * r) {
ElfRelocateFunc * func;

Back to the top