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

Unified Diff: src/cmd/ld/symtab.c

Issue 8858047: code review 8858047: cmd/ld: emit relocs for DWARF info when doing an extern... (Closed)
Patch Set: diff -r e72dad7d537b https://go.googlecode.com/hg/ Created 11 years, 10 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/ld/lib.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/ld/symtab.c
===================================================================
--- a/src/cmd/ld/symtab.c
+++ b/src/cmd/ld/symtab.c
@@ -143,6 +143,31 @@
}
void
+putelfsectionsym(Sym* s, int shndx)
+{
+ putelfsyment(0, 0, 0, (STB_LOCAL<<4)|STT_SECTION, shndx, 0);
+ s->elfsym = numelfsym++;
+}
+
+void
+putelfsymshndx(vlong sympos, int shndx)
+{
+ vlong here;
+
+ here = cpos();
+ switch(thechar) {
+ case '6':
+ cseek(sympos+6);
+ break;
+ default:
+ cseek(sympos+14);
+ break;
+ }
+ WPUT(shndx);
+ cseek(here);
+}
+
+void
asmelfsym(void)
{
Sym *s;
@@ -150,6 +175,8 @@
// the first symbol entry is reserved
putelfsyment(0, 0, 0, (STB_LOCAL<<4)|STT_NOTYPE, 0, 0);
+ dwarfaddelfsectionsyms();
+
elfbind = STB_LOCAL;
genasmsym(putelfsym);
« no previous file with comments | « src/cmd/ld/lib.h ('k') | no next file » | no next file with comments »

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