mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 22:01:29 +00:00
[LibOS] Remove useless glibc_option() Glibc callback
Previously, glibc_option() was used as a callback from Glibc into Graphene. The only use for this function was to set Glibc-internal initial heap constants based on Graphene values. Now that the patch `malloc-arena-size` was removed, this callback is useless.
This commit is contained in:
committed by
Michał Kowalczyk
parent
d0aef30b8c
commit
4aa0dc474a
@@ -86,7 +86,7 @@ diff -ruNp a/elf/Versions b/elf/Versions
|
||||
__pointer_chk_guard;
|
||||
}
|
||||
+ SHIM {
|
||||
+ syscalldb; glibc_version; glibc_option; register_library;
|
||||
+ syscalldb; glibc_version; register_library;
|
||||
+ }
|
||||
}
|
||||
diff -ruNp a/Makeconfig b/Makeconfig
|
||||
|
||||
@@ -86,7 +86,7 @@ diff -ruNp a/elf/Versions b/elf/Versions
|
||||
__tunable_get_val;
|
||||
}
|
||||
+ SHIM {
|
||||
+ syscalldb; glibc_version; glibc_option; register_library;
|
||||
+ syscalldb; glibc_version; register_library;
|
||||
+ }
|
||||
}
|
||||
diff -ruNp a/Makeconfig b/Makeconfig
|
||||
|
||||
@@ -36,7 +36,7 @@ new file mode 100644
|
||||
index 0000000..7a56162
|
||||
--- /dev/null
|
||||
+++ b/syscalldb.c
|
||||
@@ -0,0 +1,16 @@
|
||||
@@ -0,0 +1,11 @@
|
||||
+#include "syscalldb.h"
|
||||
+#include <stdarg.h>
|
||||
+#include <errno.h>
|
||||
@@ -48,17 +48,12 @@ index 0000000..7a56162
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+long int glibc_option (const char * opt)
|
||||
+{
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
diff --git a/syscalldb.h b/syscalldb.h
|
||||
new file mode 100644
|
||||
index 0000000..2833def
|
||||
--- /dev/null
|
||||
+++ b/syscalldb.h
|
||||
@@ -0,0 +1,39 @@
|
||||
@@ -0,0 +1,33 @@
|
||||
+#ifndef _SYSCALLDB_H_
|
||||
+#define _SYSCALLDB_H_
|
||||
+
|
||||
@@ -89,12 +84,6 @@ index 0000000..2833def
|
||||
+#define SYSCALLDB_ASM \
|
||||
+ "callq *syscalldb@GOTPCREL(%rip)\n\t"
|
||||
+
|
||||
+long int glibc_option (const char * opt);
|
||||
+
|
||||
+asm (
|
||||
+".weak glibc_option\r\n"
|
||||
+".type glibc_option, @function\r\n");
|
||||
+
|
||||
+#endif /* Assembler */
|
||||
+
|
||||
+#endif /* _SYSCALLDB_H */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SHIM {
|
||||
global:
|
||||
syscalldb; register_library;
|
||||
glibc_version; glibc_option;
|
||||
glibc_version;
|
||||
local: *;
|
||||
};
|
||||
|
||||
@@ -166,25 +166,6 @@ unsigned long parse_int (const char * str)
|
||||
return num;
|
||||
}
|
||||
|
||||
long int glibc_option (const char * opt)
|
||||
{
|
||||
char cfg[CONFIG_MAX];
|
||||
|
||||
if (!strcmp_static(opt, "heap_size")) {
|
||||
ssize_t ret = get_config(root_config, "glibc.heap_size", cfg, sizeof(cfg));
|
||||
if (ret <= 0) {
|
||||
debug("no glibc option: %s (err=%ld)\n", opt, ret);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
long int heap_size = parse_int(cfg);
|
||||
debug("glibc option: heap_size = %ld\n", heap_size);
|
||||
return (long int) heap_size;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
void * migrated_memory_start;
|
||||
void * migrated_memory_end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user