Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148505714
D34215.id102527.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34215.id102527.diff
View Options
Index: usr.sbin/crunch/crunchgen/crunchgen.c
===================================================================
--- usr.sbin/crunch/crunchgen/crunchgen.c
+++ usr.sbin/crunch/crunchgen/crunchgen.c
@@ -1123,7 +1123,7 @@
fprintf(outmk, " $(%s_LIBS)", p->ident);
fprintf(outmk, "\n");
- fprintf(outmk, "\t$(CC) -nostdlib -Wl,-dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)",
+ fprintf(outmk, "\t$(CC) -nostdlib -r -o %s.lo %s_stub.o $(%s_OBJPATHS)",
p->name, p->name, p->ident);
if (p->libs)
fprintf(outmk, " $(%s_LIBS)", p->ident);
Index: usr.sbin/crunch/crunchide/crunchide.c
===================================================================
--- usr.sbin/crunch/crunchide/crunchide.c
+++ usr.sbin/crunch/crunchide/crunchide.c
@@ -28,9 +28,11 @@
/*
* crunchide.c - tiptoes through a symbol table, hiding all defined
* global symbols. Allows the user to supply a "keep list" of symbols
- * that are not to be hidden. This program relies on the use of the
- * linker's -dc flag to actually put global bss data into the file's
- * bss segment (rather than leaving it as undefined "common" data).
+ * that are not to be hidden. This program used to rely on the use of the
+ * linker's -dc flag to actually put global bss data into the file's bss
+ * segment (rather than leaving it as undefined "common" data), but that
+ * seems unneeded and no longer relevant when compilers default to
+ * -fno-common.
*
* The point of all this is to allow multiple programs to be linked
* together without getting multiple-defined errors.
@@ -40,7 +42,7 @@
* int foo_main(int argc, char **argv){ return main(argc, argv); }
* like so:
* cc -c foo.c foostub.c
- * ld -dc -r foo.o foostub.o -o foo.combined.o
+ * ld -r foo.o foostub.o -o foo.combined.o
* crunchide -k _foo_main foo.combined.o
* at this point, foo.combined.o can be linked with another program
* and invoked with "foo_main(argc, argv)". foo's main() and any
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 19, 7:58 AM (1 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29955515
Default Alt Text
D34215.id102527.diff (1 KB)
Attached To
Mode
D34215: crunchgen: remove -Wl,-dc
Attached
Detach File
Event Timeline
Log In to Comment