| Age | Commit message (Collapse) | Author |
|
If you thought gcc -ansi -pedantic was pedantic, just wait
until you meet clang -fsanitize=undefined.
I think this addresses all the reported "errors", but we'll
need another run to be sure.
all.bash still passes.
Update #5764
Dave, can you please try again?
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13334049
|
|
This should have been part of revision 16731:cdedb129e020, but
I missed it. This fixes printing local variables when doing
an external link.
No test because we aren't doing any debug info testing yet.
Fixes #5719.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13464046
|
|
Enable cgo for dragonfly/386 and dragonfly/amd64.
R=golang-dev, jsing, iant, bradfitz
CC=golang-dev
https://golang.org/cl/13247046
|
|
Fixes #6319.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13539043
|
|
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/13328045
|
|
Also introduce BGET2/4, BPUT2/4 as they are widely used.
Slightly improve BGETC/BPUTC implementation.
This gives ~5% CPU time improvement on go install -a -p1 std.
Before:
real user sys
0m23.561s 0m16.625s 0m5.848s
0m23.766s 0m16.624s 0m5.846s
0m23.742s 0m16.621s 0m5.868s
after:
0m22.999s 0m15.841s 0m5.889s
0m22.845s 0m15.808s 0m5.850s
0m22.889s 0m15.832s 0m5.848s
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12745047
|
|
#pragma textflag and #pragma dataflag directives.
Update dataflag directives to use symbols instead of integer constants.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/13310043
|
|
Add dragonfly/amd64 support to the Go compiler, bootstrap and GOOS list.
R=devon.odell, bradfitz
CC=golang-dev
https://golang.org/cl/12796050
|
|
CL 12741044 added an extra iself condition to an if statement that already contained it. Remove it.
R=rsc
CC=golang-dev
https://golang.org/cl/12949043
|
|
The TLS block on Darwin is not the same as on ELF.
TBR=elias.naur
CC=golang-dev
https://golang.org/cl/12741044
|
|
external linking
This CL is an aggregate of 10271047, 10499043, 9733044. Descriptions of each follow:
10499043
runtime,cmd/ld: Merge TLS symbols and teach 5l about ARM TLS
This CL prepares for external linking support to ARM.
The pseudo-symbols runtime.g and runtime.m are merged into a single
runtime.tlsgm symbol. When external linking, the offset of a thread local
variable is stored at a memory location instead of being embedded into a offset
of a ldr instruction. With a single runtime.tlsgm symbol for both g and m, only
one such offset is needed.
The larger part of this CL moves TLS code from gcc compiled to internally
compiled. The TLS code now uses the modern MRC instruction, and 5l is taught
about TLS fallbacks in case the instruction is not available or appropriate.
10271047
This CL adds support for -linkmode external to 5l.
For 5l itself, use addrel to allow for D_CALL relocations to be handled by the
host linker. Of the cases listed in rsc's comment in issue 4069, only case 5 and
63 needed an update. One of the TODO: addrel cases was since replaced, and the
rest of the cases are either covered by indirection through addpool (cases with
LTO or LFROM flags) or stubs (case 74). The addpool cases are covered because
addpool emits AWORD instructions, which in turn are handled by case 11.
In the runtime, change the argv argument in the rt0* functions slightly to be a
pointer to the argv list, instead of relying on a particular location of argv.
9733044
The -shared flag to 6l outputs a shared library, implemented in Go
and callable from non-Go programs such as C.
The main part of this CL change the thread local storage model.
Go uses the fastest and least general mode, local exec. TLS data in shared
libraries normally requires at least the local dynamic mode, however, this CL
instead opts for using the initial exec mode. Initial exec mode is faster than
local dynamic mode and can be used in linux since the linker has reserved a
limited amount of TLS space for performance sensitive TLS code.
Initial exec mode requires an extra load from the GOT table to determine the
TLS offset. This penalty will not be paid if ld is not in -shared mode, since
TLS accesses will be reduced to local exec.
The elf sections .init_array and .rela.init_array are added to register the Go
runtime entry with cgo at library load time.
The "hidden" attribute is added to Cgo functions called from Go, since Go
does not generate call through the GOT table, and adding non-GOT relocations for
a global function is not supported by gcc. Cgo symbols don't need to be global
and avoiding the GOT table is also faster.
The changes to 8l are only removes code relevant to the old -shared mode where
internal linking was used.
This CL only address the low level linker work. It can be submitted by itself,
but to be useful, the runtime changes in CL 9738047 is also needed.
Design discussion at
https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/zmjXkGrEx6Q
Fixes #5590.
R=rsc
CC=golang-dev
https://golang.org/cl/12871044
|
|
We can then include this file in assembly to replace
cryptic constants like "7" with meaningful constants
like "(NOPROF|DUPOK|NOSPLIT)".
Converting just pkg/runtime/asm*.s for now. Dropping NOPROF
and DUPOK from lots of places where they aren't needed.
More .s files to come in a subsequent changelist.
A nonzero number in the textflag field now means
"has not been converted yet".
R=golang-dev, daniel.morsing, rsc, khr
CC=golang-dev
https://golang.org/cl/12568043
|
|
R=golang-dev, r, khr, rsc
CC=golang-dev
https://golang.org/cl/12053043
|
|
Also move chatty recent additions to -v -v.
For what it's worth:
$ go build -o /dev/null -ldflags -v cmd/go
...
0.87 pclntab=1110836 bytes, funcdata total 69700 bytes
...
$
This broke the ELF builds last time because I tried to dedup
the funcdata in case the same funcdata was pointed at by
multiple functions. That doesn't currently happen, so I've
removed that test.
If we start doing bitmap coalescing we'll need to figure out
how to measure the size more carefully, but I think at that
point the bitmaps will be an extra indirection away from the
funcdata anyway, so the dedup I used before wouldn't help.
R=ken2
CC=golang-dev
https://golang.org/cl/12269043
|
|
Breaks all ELF builds.
««« original CL description
cmd/ld: report pclntab, funcdata sizes in 6l -v output
Also move chatty recent additions to -v -v.
For what it's worth:
$ go build -o /dev/null -ldflags -v cmd/godoc
...
0.73 pclntab=1259976 bytes, funcdata total 79788 bytes
...
$
R=ken2
CC=cshapiro, golang-dev
https://golang.org/cl/12193043
»»»
R=rsc
CC=golang-dev
https://golang.org/cl/12202043
|
|
Also move chatty recent additions to -v -v.
For what it's worth:
$ go build -o /dev/null -ldflags -v cmd/godoc
...
0.73 pclntab=1259976 bytes, funcdata total 79788 bytes
...
$
R=ken2
CC=cshapiro, golang-dev
https://golang.org/cl/12193043
|
|
src/cmd/ld/lib.c:1379 set and not used: p
src/cmd/ld/lib.c:1426 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1437 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1456 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1477 format mismatch 6llux INT, arg 3
src/cmd/ld/lib.c:1459 set and not used: started
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11615044
|
|
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11604043
|
|
Fixes #5924.
R=golang-dev, khr, rsc
CC=golang-dev
https://golang.org/cl/11606043
|
|
This CL introduces a FUNCDATA number for runtime-specific
garbage collection metadata, changes the C and Go compilers
to emit that metadata, and changes the runtime to expect it.
The old pseudo-instructions that carried this information
are gone, as is the linker code to process them.
R=golang-dev, dvyukov, cshapiro
CC=golang-dev
https://golang.org/cl/11406044
|
|
whose argument size is unknown (C vararg functions, and
assembly code without an explicit specification).
We used to use 0 to mean "unknown" and 1 to mean "zero".
Now we use ArgsSizeUnknown (0x80000000) to mean "unknown".
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/11590043
|
|
This should fix the Windows build, or at least
what's breaking it at the moment.
Fixes #5904.
TBR=golang-dev
CC=golang-dev
https://golang.org/cl/11519044
|
|
R=golang-dev, r, dave
CC=golang-dev
https://golang.org/cl/11494043
|
|
R=golang-dev, r, rsc
CC=golang-dev
https://golang.org/cl/11436043
|
|
Design at http://golang.org/s/go12symtab.
This enables some cleanup of the garbage collector metadata
that will be done in future CLs.
This CL does not move the old symtab and pclntab back into
an unmapped section of the file. That's a bit tricky and will be
done separately.
Fixes #4020.
R=golang-dev, dave, cshapiro, iant, r
CC=golang-dev, nigeltao
https://golang.org/cl/11085043
|
|
R=golang-dev, dave, r
CC=golang-dev, nigeltao
https://golang.org/cl/10713043
|
|
If you compute the size by subtraction from the address
of the next symbol, it helps to wait until the symbols have
been sorted by address.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11143043
|
|
Fix warning found by clang 3.3.
R=rsc, r
CC=golang-dev
https://golang.org/cl/11022043
|
|
USEFIELD is a special kind of NOP, so treat it like a NOP
when generating the pc-ln table.
There are more invasive fixes that could be applied here.
I am going for minimum number of lines changed.
The smallest test case we know of is five distinct Go files
in four packages, and the bug only happens with
GOEXPERIMENT=fieldtrack enabled, which we don't
normally build with, so the test would never run
meaningfully anyway.
Fixes #5762.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/10495044
|
|
Fixes #5463.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9239045
|
|
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/10159043
|
|
R=golang-dev, bradfitz, khr, r
CC=golang-dev
https://golang.org/cl/7461046
|
|
These two symbols don't show up in the Go symbol table
since they're defined in dodata which is called sometime
after symtab. They do, however, show up in the ELF symbol
table.
This regression was introduced in changeset 01c40d533367.
Also, remove the corresponding strings from the ELF strtab
section now that they're unused.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/8650043
|
|
Remove unnecessary ( ) around == in && clause.
Add { } around multiline if body, even though it's one statement.
Add runtime: prefix to printed errors.
R=cshapiro, iant
CC=golang-dev
https://golang.org/cl/9685047
|
|
A nosplits was assumed to have no argument information and no
pointer map. However, nosplits created by the linker often
have both. This change uses the pointer map size as an
alternate source of argument size when processing a nosplit.
In addition, the symbol table construction pointer map size
and argument size consistency check is strengthened. If a
nptrs is greater than 0 it must be equal to the number of
argument words.
R=golang-dev, khr, khr
CC=golang-dev
https://golang.org/cl/9666047
|
|
argument pointer locations
With this change the compiler emits a bitmap for each function
covering its stack frame arguments area. If an argument word
is known to contain a pointer, a bit is set. The garbage
collector reads this information when scanning the stack by
frames and uses it to ignores locations known to not contain a
pointer.
R=golang-dev, bradfitz, daniel.morsing, dvyukov, khr, khr, iant, cshapiro
CC=golang-dev
https://golang.org/cl/9223046
|
|
Fixes #5200.
R=iant, dave
CC=golang-dev
https://golang.org/cl/9383043
|
|
Fixes #5392.
R=iant, r
CC=golang-dev
https://golang.org/cl/9119043
|
|
As advised by iant. Fixes windows build.
R=golang-dev, r
CC=golang-dev, iant
https://golang.org/cl/9110044
|
|
"The usual conversions" bite again.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/9103044
|
|
This is needed for SWIG when linking in internal mode. In
internal mode if a symbol was cgo_import_static we used to
forget that it was also cgo_import_dynamic.
R=rsc, r
CC=golang-dev
https://golang.org/cl/9080043
|
|
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9025047
|
|
I would like opinions on whether this is a good idea for 1.1.
On the one hand it's a moderately important issue. On the
other hand this introduces at least the possibility of
external linker errors due to the additional relocations and
it may be better to wait.
I'm fairly confident that the behaviour is unchanged when not
using an external linker.
Update #5221
This CL is tested lightly on 386 and amd64 and fixes the cases
I tested. I have not tested it on Darwin or Windows.
R=golang-dev, dave, daniel.morsing, rsc
CC=golang-dev
https://golang.org/cl/8858047
|
|
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9036046
|
|
PC-relative needs a signed offset; others need unsigned.
Also fix signedness of 32-bit relocation on Windows.
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/9039045
|
|
the issue.
R=golang-dev, dsymonds, dave
CC=golang-dev
https://golang.org/cl/9038043
|
|
A few places in the linker pushed 64-bit values through 32-bit holes,
including in relocation.
Clean them up, and check for a few other overflows as well.
Tests to follow.
R=dsymonds
CC=gobot, golang-dev
https://golang.org/cl/9032043
|
|
This should have been part of CL8715043.
Update #5106
R=golang-dev, r, iant
CC=golang-dev
https://golang.org/cl/8676050
|
|
before:
fmt.statictmp_0731:/usr/local/go/pkg/tool/linux_amd64/6l: running gcc failed: unsuccessful exit status 0x100
now:
/usr/local/go/pkg/tool/linux_amd64/6l: running gcc failed: unsuccessful exit status 0x100
R=golang-dev, iant, r
CC=golang-dev
https://golang.org/cl/8827045
|
|
Update #5106
Update #5273
R=minux.ma, r
CC=golang-dev
https://golang.org/cl/8715043
|