Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
b433552e
Commit
b433552e
authored
Aug 30, 2010
by
Luuk van Dijk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8l: emit DWARF in ELF.
R=rsc, r, ken2 CC=golang-dev
https://golang.org/cl/2004046
parent
5c603dbb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
6 deletions
+27
-6
asm.c
src/cmd/6l/asm.c
+1
-2
l.h
src/cmd/6l/l.h
+1
-1
Makefile
src/cmd/8l/Makefile
+4
-1
asm.c
src/cmd/8l/asm.c
+18
-2
l.h
src/cmd/8l/l.h
+1
-0
obj.c
src/cmd/8l/obj.c
+2
-0
dwarf.c
src/cmd/ld/dwarf.c
+0
-0
No files found.
src/cmd/6l/asm.c
View file @
b433552e
...
...
@@ -641,8 +641,7 @@ asmb(void)
dwarfemitdebugsections
();
}
}
else
if
(
dlm
){
}
else
if
(
dlm
){
seek
(
cout
,
HEADR
+
textsize
+
datsize
,
0
);
asmdyn
();
cflush
();
...
...
src/cmd/6l/l.h
View file @
b433552e
...
...
@@ -394,9 +394,9 @@ Prog* brchain(Prog*);
Prog
*
brloop
(
Prog
*
);
void
buildop
(
void
);
void
cflush
(
void
);
vlong
cpos
(
void
);
void
ckoff
(
Sym
*
,
int32
);
Prog
*
copyp
(
Prog
*
);
vlong
cpos
(
void
);
double
cputime
(
void
);
void
datblk
(
int32
,
int32
);
void
deadcode
(
void
);
...
...
src/cmd/8l/Makefile
View file @
b433552e
...
...
@@ -9,8 +9,10 @@ TARG=8l
OFILES
=
\
asm.
$O
\
dwarf.
$O
\
elf.
$O
\
enam.
$O
\
go.
$O
\
lib.
$O
\
list.
$O
\
macho.
$O
\
...
...
@@ -19,11 +21,12 @@ OFILES=\
pass.
$O
\
pe.
$O
\
span.
$O
\
go.
$O
\
HFILES
=
\
l.h
\
../8l/8.out.h
\
../ld/dwarf.h
\
../ld/elf.h
\
../ld/macho.h
\
../ld/pe.h
\
...
...
src/cmd/8l/asm.c
View file @
b433552e
...
...
@@ -31,6 +31,7 @@
#include "l.h"
#include "../ld/lib.h"
#include "../ld/elf.h"
#include "../ld/dwarf.h"
#include "../ld/macho.h"
#include "../ld/pe.h"
...
...
@@ -293,6 +294,7 @@ doelf(void)
elfstr
[
ElfStrGosymcounts
]
=
addstring
(
shstrtab
,
".gosymcounts"
);
elfstr
[
ElfStrGosymtab
]
=
addstring
(
shstrtab
,
".gosymtab"
);
elfstr
[
ElfStrGopclntab
]
=
addstring
(
shstrtab
,
".gopclntab"
);
dwarfaddshstrings
(
shstrtab
);
}
elfstr
[
ElfStrShstrtab
]
=
addstring
(
shstrtab
,
".shstrtab"
);
...
...
@@ -649,8 +651,13 @@ asmb(void)
lputl
(
symsize
);
lputl
(
lcsize
);
cflush
();
}
else
if
(
dlm
){
if
(
!
debug
[
's'
])
{
seek
(
cout
,
symo
+
8
+
symsize
+
lcsize
,
0
);
if
(
debug
[
'v'
])
Bprint
(
&
bso
,
"%5.2f dwarf
\n
"
,
cputime
());
dwarfemitdebugsections
();
}
}
else
if
(
dlm
){
seek
(
cout
,
HEADR
+
textsize
+
datsize
,
0
);
asmdyn
();
cflush
();
...
...
@@ -1042,6 +1049,8 @@ asmb(void)
sh
->
size
=
w
;
sh
->
addralign
=
1
;
sh
->
addr
=
symdatva
+
8
+
symsize
;
dwarfaddheaders
();
}
sh
=
newElfShstrtab
(
elfstr
[
ElfStrShstrtab
]);
...
...
@@ -1118,6 +1127,13 @@ cflush(void)
cbc
=
sizeof
(
buf
.
cbuf
);
}
/* Current position in file */
vlong
cpos
(
void
)
{
return
seek
(
cout
,
0
,
1
)
+
sizeof
(
buf
.
cbuf
)
-
cbc
;
}
void
datblk
(
int32
s
,
int32
n
)
{
...
...
src/cmd/8l/l.h
View file @
b433552e
...
...
@@ -345,6 +345,7 @@ Prog* brloop(Prog*);
void
cflush
(
void
);
void
ckoff
(
Sym
*
,
int32
);
Prog
*
copyp
(
Prog
*
);
vlong
cpos
(
void
);
double
cputime
(
void
);
void
datblk
(
int32
,
int32
);
void
diag
(
char
*
,
...);
...
...
src/cmd/8l/obj.c
View file @
b433552e
...
...
@@ -33,6 +33,7 @@
#include "../ld/lib.h"
#include "../ld/elf.h"
#include "../ld/macho.h"
#include "../ld/dwarf.h"
#include "../ld/pe.h"
#include <ar.h>
...
...
@@ -604,6 +605,7 @@ loop:
histfrogp
++
;
}
else
collapsefrog
(
s
);
dwarfaddfrag
(
s
->
value
,
s
->
name
);
}
goto
loop
;
}
...
...
src/cmd/ld/dwarf.c
View file @
b433552e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment