LEFT | RIGHT |
(no file at all) | |
1 // Inferno utils/5l/obj.c | 1 // Inferno utils/5l/obj.c |
2 // http://code.google.com/p/inferno-os/source/browse/utils/5l/obj.c | 2 // http://code.google.com/p/inferno-os/source/browse/utils/5l/obj.c |
3 // | 3 // |
4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. | 4 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. |
5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) | 5 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) |
6 // Portions Copyright © 1997-1999 Vita Nuova Limited | 6 // Portions Copyright © 1997-1999 Vita Nuova Limited |
7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov
a.com) | 7 // Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuov
a.com) |
8 // Portions Copyright © 2004,2006 Bruce Ellis | 8 // Portions Copyright © 2004,2006 Bruce Ellis |
9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) | 9 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) |
10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others | 10 // Revisions Copyright © 2000-2007 Lucent Technologies Inc. and others |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 Binit(&bso, 1, OWRITE); | 74 Binit(&bso, 1, OWRITE); |
75 listinit(); | 75 listinit(); |
76 nerrors = 0; | 76 nerrors = 0; |
77 outfile = "5.out"; | 77 outfile = "5.out"; |
78 HEADTYPE = -1; | 78 HEADTYPE = -1; |
79 INITTEXT = -1; | 79 INITTEXT = -1; |
80 INITDAT = -1; | 80 INITDAT = -1; |
81 INITRND = -1; | 81 INITRND = -1; |
82 INITENTRY = 0; | 82 INITENTRY = 0; |
| 83 LIBINITENTRY = 0; |
83 nuxiinit(); | 84 nuxiinit(); |
84 ········ | 85 ········ |
85 p = getgoarm(); | 86 p = getgoarm(); |
86 if(p != nil) | 87 if(p != nil) |
87 goarm = atoi(p); | 88 goarm = atoi(p); |
88 else | 89 else |
89 goarm = 6; | 90 goarm = 6; |
90 if(goarm == 5) | 91 if(goarm == 5) |
91 debug['F'] = 1; | 92 debug['F'] = 1; |
92 | 93 |
(...skipping 23 matching lines...) Expand all Loading... |
116 flagstr("k", "sym: set field tracking symbol", &tracksym); | 117 flagstr("k", "sym: set field tracking symbol", &tracksym); |
117 flagcount("n", "dump symbol table", &debug['n']); | 118 flagcount("n", "dump symbol table", &debug['n']); |
118 flagstr("o", "outfile: set output file", &outfile); | 119 flagstr("o", "outfile: set output file", &outfile); |
119 flagcount("p", "insert profiling code", &debug['p']); | 120 flagcount("p", "insert profiling code", &debug['p']); |
120 flagstr("r", "dir1:dir2:...: set ELF dynamic linker search path", &rpath
); | 121 flagstr("r", "dir1:dir2:...: set ELF dynamic linker search path", &rpath
); |
121 flagcount("race", "enable race detector", &flag_race); | 122 flagcount("race", "enable race detector", &flag_race); |
122 flagcount("s", "disable symbol table", &debug['s']); | 123 flagcount("s", "disable symbol table", &debug['s']); |
123 flagcount("u", "reject unsafe packages", &debug['u']); | 124 flagcount("u", "reject unsafe packages", &debug['u']); |
124 flagcount("v", "print link trace", &debug['v']); | 125 flagcount("v", "print link trace", &debug['v']); |
125 flagcount("w", "disable DWARF generation", &debug['w']); | 126 flagcount("w", "disable DWARF generation", &debug['w']); |
| 127 flagcount("shared", "generate shared object", &flag_shared); |
126 ········ | 128 ········ |
127 flagparse(&argc, &argv, usage); | 129 flagparse(&argc, &argv, usage); |
128 | 130 |
129 if(argc != 1) | 131 if(argc != 1) |
130 usage(); | 132 usage(); |
131 | 133 |
132 libinit(); | 134 libinit(); |
133 | 135 |
134 if(HEADTYPE == -1) | 136 if(HEADTYPE == -1) |
135 HEADTYPE = headtype(goos); | 137 HEADTYPE = headtype(goos); |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 appendp(Prog *q) | 741 appendp(Prog *q) |
740 { | 742 { |
741 Prog *p; | 743 Prog *p; |
742 | 744 |
743 p = prg(); | 745 p = prg(); |
744 p->link = q->link; | 746 p->link = q->link; |
745 q->link = p; | 747 q->link = p; |
746 p->line = q->line; | 748 p->line = q->line; |
747 return p; | 749 return p; |
748 } | 750 } |
LEFT | RIGHT |