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

Unified Diff: src/cmd/5l/noop.c

Issue 6926049: code review 6926049: 6c/6g/6l/go: PIC and shared library support. (Closed)
Patch Set: diff -r 9dacae220eca https://go.googlecode.com/hg/ Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/5l/list.c ('k') | src/cmd/5l/obj.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/5l/noop.c
===================================================================
--- a/src/cmd/5l/noop.c
+++ b/src/cmd/5l/noop.c
@@ -45,6 +45,20 @@
static Sym* sym_mod;
static Sym* sym_modu;
+static void
+linkcase(Prog *casep)
+{
+ Prog *p;
+
+ for(p = casep; p != P; p = p->link){
+ if(p->as == ABCASE) {
+ for(; p != P && p->as == ABCASE; p = p->link)
+ p->pcrel = casep;
+ break;
+ }
+ }
+}
+
void
noops(void)
{
@@ -76,6 +90,11 @@
for(cursym = textp; cursym != nil; cursym = cursym->next) {
for(p = cursym->text; p != P; p = p->link) {
switch(p->as) {
+ case ACASE:
+ if(flag_shared)
+ linkcase(p);
+ break;
+
case ATEXT:
p->mark |= LEAF;
break;
« no previous file with comments | « src/cmd/5l/list.c ('k') | src/cmd/5l/obj.c » ('j') | no next file with comments »

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