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

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

Issue 4794046: code review 4794046: ld: fix freebsd build reverting .interp move (Closed)
Patch Set: diff -r 8f4c6113ed2d https://go.googlecode.com/hg/ Created 12 years, 8 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 | « no previous file | src/cmd/6l/asm.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/5l/asm.c
===================================================================
--- a/src/cmd/5l/asm.c
+++ b/src/cmd/5l/asm.c
@@ -185,14 +185,6 @@
elfstr[ElfStrRelPlt] = addstring(shstrtab, ".rel.plt");
elfstr[ElfStrPlt] = addstring(shstrtab, ".plt");
- /* interpreter string */
- if(interpreter == nil)
- interpreter = linuxdynld;
- s = lookup(".interp", 0);
- s->type = SELFROSECT;
- s->reachable = 1;
- addstring(s, interpreter);
-
/* dynamic symbol table - first entry all zeros */
s = lookup(".dynsym", 0);
s->type = SELFROSECT;
@@ -492,7 +484,9 @@
sh->type = SHT_PROGBITS;
sh->flags = SHF_ALLOC;
sh->addralign = 1;
- shsym(sh, lookup(".interp", 0));
+ if(interpreter == nil)
+ interpreter = linuxdynld;
+ elfinterp(sh, startva, interpreter);
ph = newElfPhdr();
ph->type = PT_INTERP;
@@ -638,7 +632,7 @@
a += elfwritephdrs();
a += elfwriteshdrs();
cflush();
- if(a > ELFRESERVE)
+ if(a+elfwriteinterp() > ELFRESERVE)
diag("ELFRESERVE too small: %d > %d", a, ELFRESERVE);
break;
}
« no previous file with comments | « no previous file | src/cmd/6l/asm.c » ('j') | no next file with comments »

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