Discussion:
[Tinycc-devel] "nostdlib" option in libtcc
Gabriel Corneanu
2012-04-17 07:34:23 UTC
Permalink
Hello everybody,

I asked this in a reply to another topic...

I have a simple change request; I need "nostdlib" with libtcc.
I didn't find any workaround except adding it to "tcc_set_linker" function.

Is there any reason against it?

Can someone add this simple patch? Or should I add it myself?

diff --git a/libtcc.c b/libtcc.c
index f448c34..fc3213b 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -1489,6 +1489,8 @@ PUB_FUNC const char * tcc_set_linker(TCCState *s,
char *option, int multi)
end = NULL;
if (link_option(option, "Bsymbolic", &p)) {
s->symbolic = TRUE;
+ } else if (link_option(option, "nostdlib", &p)) {
+ s->nostdlib = TRUE;
} else if (link_option(option, "fini=", &p)) {
s->fini_symbol = p;
if (s->warn_unsupported)

Regards,
Gabriel
Milutin Jovanović
2012-04-17 14:20:01 UTC
Permalink
You should really do it. Set yourself up to commit, and controbuting in the
future will be much easier. Also, your work will be correctly attributed to
you. Just execute:

git remote set-url --push origin ssh://***@repo.or.cz/srv/git/tinycc.git
and then you will be able to do "git push" your changes.

Miki.
Post by Gabriel Corneanu
Hello everybody,
I asked this in a reply to another topic...
I have a simple change request; I need "nostdlib" with libtcc.
I didn't find any workaround except adding it to "tcc_set_linker" function.
Is there any reason against it?
Can someone add this simple patch? Or should I add it myself?
diff --git a/libtcc.c b/libtcc.c
index f448c34..fc3213b 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -1489,6 +1489,8 @@ PUB_FUNC const char * tcc_set_linker(TCCState *s,
char *option, int multi)
end = NULL;
if (link_option(option, "Bsymbolic", &p)) {
s->symbolic = TRUE;
+ } else if (link_option(option, "nostdlib", &p)) {
+ s->nostdlib = TRUE;
} else if (link_option(option, "fini=", &p)) {
s->fini_symbol = p;
if (s->warn_unsupported)
Regards,
Gabriel
_______________________________________________
Tinycc-devel mailing list
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Loading...