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

Unified Diff: src/liblink/objfile.c

Issue 88190043: code review 88190043: liblink, cmd/ld: reenable nosplit checking and test (Closed)
Patch Set: diff -r 4873079c140c https://code.google.com/p/go/ Created 10 years, 11 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/liblink/obj6.c ('k') | src/liblink/pcln.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liblink/objfile.c
===================================================================
--- a/src/liblink/objfile.c
+++ b/src/liblink/objfile.c
@@ -43,12 +43,13 @@
// - gotype [symbol reference]
// - p [data block]
// - nr [int]
-// - r [nr relocations]
+// - r [nr relocations, sorted by off]
//
// If type == STEXT, there are a few more fields:
//
// - args [int]
// - locals [int]
+// - nosplit [int]
// - leaf [int]
// - nlocal [int]
// - local [nlocal automatics]
@@ -226,6 +227,8 @@
flag = p->from.scale;
if(flag & DUPOK)
s->dupok = 1;
+ if(flag & NOSPLIT)
+ s->nosplit = 1;
s->next = nil;
s->type = STEXT;
s->text = p;
@@ -294,6 +297,8 @@
Bprint(ctxt->bso, "t=%d ", s->type);
if(s->dupok)
Bprint(ctxt->bso, "dupok ");
+ if(s->nosplit)
+ Bprint(ctxt->bso, "nosplit ");
Bprint(ctxt->bso, "size=%lld value=%lld", (vlong)s->size, (vlong)s->value);
if(s->type == STEXT) {
Bprint(ctxt->bso, " args=%#llux locals=%#llux", (uvlong)s->args, (uvlong)s->locals);
@@ -353,6 +358,7 @@
if(s->type == STEXT) {
wrint(b, s->args);
wrint(b, s->locals);
+ wrint(b, s->nosplit);
wrint(b, s->leaf);
n = 0;
for(a = s->autom; a != nil; a = a->link)
@@ -574,6 +580,7 @@
if(s->type == STEXT) {
s->args = rdint(f);
s->locals = rdint(f);
+ s->nosplit = rdint(f);
s->leaf = rdint(f);
n = rdint(f);
for(i=0; i<n; i++) {
@@ -630,6 +637,8 @@
Bprint(ctxt->bso, "t=%d ", s->type);
if(s->dupok)
Bprint(ctxt->bso, "dupok ");
+ if(s->nosplit)
+ Bprint(ctxt->bso, "nosplit ");
Bprint(ctxt->bso, "size=%lld value=%lld", (vlong)s->size, (vlong)s->value);
if(s->type == STEXT)
Bprint(ctxt->bso, " args=%#llux locals=%#llux", (uvlong)s->args, (uvlong)s->locals);
« no previous file with comments | « src/liblink/obj6.c ('k') | src/liblink/pcln.c » ('j') | no next file with comments »

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