Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2417)

Delta Between Two Patch Sets: src/cmd/5l/obj.c

Issue 7965043: code review 7965043: cmd/5l, cmd/6l, cmd/8l: fix segfault on reading LOCALS ... (Closed)
Left Patch Set: diff -r 86d952ac0976 https://go.googlecode.com/hg/ Created 12 years ago
Right Patch Set: diff -r b3cfb8be2faf https://go.googlecode.com/hg/ Created 12 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | src/cmd/6l/obj.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 flagcount("v", "print link trace", &debug['v']); 129 flagcount("v", "print link trace", &debug['v']);
130 flagcount("w", "disable DWARF generation", &debug['w']); 130 flagcount("w", "disable DWARF generation", &debug['w']);
131 flagcount("shared", "generate shared object", &flag_shared); 131 flagcount("shared", "generate shared object", &flag_shared);
132 // TODO: link mode flag 132 // TODO: link mode flag
133 ········ 133 ········
134 flagparse(&argc, &argv, usage); 134 flagparse(&argc, &argv, usage);
135 135
136 if(argc != 1) 136 if(argc != 1)
137 usage(); 137 usage();
138 138
139 » if(linkmode != LinkInternal) { 139 » if(linkmode == LinkExternal) {
140 diag("only -linkmode=internal is supported"); 140 diag("only -linkmode=internal is supported");
141 errorexit(); 141 errorexit();
142 } else if(linkmode == LinkAuto) {
143 linkmode = LinkInternal;
142 } 144 }
143 145
144 libinit(); 146 libinit();
145 147
146 if(HEADTYPE == -1) 148 if(HEADTYPE == -1)
147 HEADTYPE = headtype(goos); 149 HEADTYPE = headtype(goos);
148 switch(HEADTYPE) { 150 switch(HEADTYPE) {
149 default: 151 default:
150 diag("unknown -H option"); 152 diag("unknown -H option");
151 errorexit(); 153 errorexit();
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 appendp(Prog *q) 787 appendp(Prog *q)
786 { 788 {
787 Prog *p; 789 Prog *p;
788 790
789 p = prg(); 791 p = prg();
790 p->link = q->link; 792 p->link = q->link;
791 q->link = p; 793 q->link = p;
792 p->line = q->line; 794 p->line = q->line;
793 return p; 795 return p;
794 } 796 }
LEFTRIGHT
« no previous file | src/cmd/6l/obj.c » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b