summaryrefslogtreecommitdiff
path: root/x-long-name-to-create-gnu-extension-in-archive.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-07-16 15:07:54 +1000
committerChris Johns <chrisj@rtems.org>2012-07-16 15:07:54 +1000
commit5d126da01db7c0e140ca35389dfe8f7227f10622 (patch)
treeec501af328f2fd23a4ae7cdd53991fb8743b831d /x-long-name-to-create-gnu-extension-in-archive.c
parent8f06d01b2c6e051d9b6f733f6673b796490983f9 (diff)
Resolve unresolved externals when loading object files.
Object files that depend on each other will cause an unresolved external. The change lets object files load with unresolved externals and will resolve them when the object file with the external is loaded. A common table of symbol strings and relocation records is maintained. The symbol string is shared by each object file that is unresolved. Each relocation record that references the symbol is held. The table is a series of small blocks that compact as symbols are resolved. The number of symbols left unresolved is typically small this design avoids fragmentation of the heap memory.
Diffstat (limited to 'x-long-name-to-create-gnu-extension-in-archive.c')
-rw-r--r--x-long-name-to-create-gnu-extension-in-archive.c4
1 files changed, 4 insertions, 0 deletions
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 e94cf0c..38cf079 100644
--- a/x-long-name-to-create-gnu-extension-in-archive.c
+++ b/x-long-name-to-create-gnu-extension-in-archive.c
@@ -14,6 +14,10 @@ void y_writeln(const char* s) __attribute__ ((section (".bar")));
int z_writeln(int argc, const char* argv[]);
int my_main (int argc, char* argv[]);
+#if RTL_GSYM_EMBEDDED
+#define sin(_d) (_d)
+#endif
+
void
w_writeln(double d)
{