<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/cmd/link/internal/loader/loader.go, branch json-isValidNumber-before</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=json-isValidNumber-before</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=json-isValidNumber-before'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2023-01-25T20:45:42Z</updated>
<entry>
<title>cmd/link: don't export all symbols for ELF external linking</title>
<updated>2023-01-25T20:45:42Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2022-06-27T21:58:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1f29f39795e736238200840c368c4e0c6edbfbae'/>
<id>urn:sha1:1f29f39795e736238200840c368c4e0c6edbfbae</id>
<content type='text'>
Since this may add a large number of --export-dynamic-symbol options,
use a response file if the command line gets large.

Fixes #53579

Change-Id: Ic226bf372bf1e177a3dae886d1c48f4ce3569c0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/414654
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Joedian Reid &lt;joedian@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Auto-Submit: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>cmd/link: improved host archive debug trace output</title>
<updated>2022-11-19T22:39:30Z</updated>
<author>
<name>Than McIntosh</name>
<email>thanm@google.com</email>
</author>
<published>2022-11-01T14:27:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8205d83fe29e315eeb8f64f095a4d2594c9cd1c6'/>
<id>urn:sha1:8205d83fe29e315eeb8f64f095a4d2594c9cd1c6</id>
<content type='text'>
When ctxt.Debugvlog &gt; 1, produce additional trace output to describe
which object files are being pulled out of host archive libraries and
why they were pulled (e.g. which symbol had a reference to something
in a library). Intended to make it easier to debug problems with cgo
internal linking.

Change-Id: Icd64aff244b9145162a00cb51642ef32f26adfba
Reviewed-on: https://go-review.googlesource.com/c/go/+/451736
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Run-TryBot: Than McIntosh &lt;thanm@google.com&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>cmd/compile,cmd/link,runtime: add start line numbers to func metadata</title>
<updated>2022-10-14T14:47:12Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2022-09-07T17:23:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=f2656f20ea420ada5f15ef06ddf18d2797e18841'/>
<id>urn:sha1:f2656f20ea420ada5f15ef06ddf18d2797e18841</id>
<content type='text'>
This adds the function "start line number" to runtime._func and
runtime.inlinedCall objects. The "start line number" is the line number
of the func keyword or TEXT directive for assembly.

Subtracting the start line number from PC line number provides the
relative line offset of a PC from the the start of the function. This
helps with source stability by allowing code above the function to move
without invalidating samples within the function.

Encoding start line rather than relative lines directly is convenient
because the pprof format already contains a start line field.

This CL uses a straightforward encoding of explictly including a start
line field in every _func and inlinedCall. It is possible that we could
compress this further in the future. e.g., functions with a prologue
usually have &lt;line of PC 0&gt; == &lt;start line&gt;. In runtime.test, 95% of
functions have &lt;line of PC 0&gt; == &lt;start line&gt;.

According to bent, this is geomean +0.83% binary size vs master and
-0.31% binary size vs 1.19.

Note that //line directives can change the file and line numbers
arbitrarily. The encoded start line is as adjusted by //line directives.
Since this can change in the middle of a function, `line - start line`
offset calculations may not be meaningful if //line directives are in
use.

For #55022.

Change-Id: Iaabbc6dd4f85ffdda294266ef982ae838cc692f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/429638
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/link: refactor usage of SymLocalentry helper functions</title>
<updated>2022-09-27T17:29:05Z</updated>
<author>
<name>Paul E. Murphy</name>
<email>murp@ibm.com</email>
</author>
<published>2022-09-19T21:48:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=edd1273b841050e96d9ddd937fc00c0eebe10f1b'/>
<id>urn:sha1:edd1273b841050e96d9ddd937fc00c0eebe10f1b</id>
<content type='text'>
PPC64 ELFv2 uses the st_other field of a symbol to specify an offset
from the global entry point to its local entry point. Similarly, some
values (i.e 1) may also require additional linker support which is
missing today.

For now, generate an error if we encounter unsupported local entry
values on PPC64, and update the Localentry values to use bytes, not
32b instruction words.

Similarly, ELFv2 1.5 also updates the wording of values 2-6. They
now map to a specific number of bytes.

Change-Id: Id1b71c3b0fea982bdcfb7eac91d9f93e04ae43f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/431876
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Run-TryBot: Paul Murphy &lt;murp@ibm.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/link: fix trampolines breaking DWARF line info</title>
<updated>2022-08-11T14:11:53Z</updated>
<author>
<name>Jeremy Quirke</name>
<email>qjeremy@uber.com</email>
</author>
<published>2022-08-09T17:20:33Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=2340d371796f95acdcc399e60f9ecefec2add8df'/>
<id>urn:sha1:2340d371796f95acdcc399e60f9ecefec2add8df</id>
<content type='text'>
When trampolines are needed (e.g. Darwin ARM64), the DWARF LPT (Line
Program Table - see DWARF section 6.1) generation fails because the
replacement symbols are marked as external symbols and skipped during
the DWARF LPT generation phase.

Fixes #54320

Change-Id: I6c93f5378f50e5edf30d5121402a48214abb1ce2
GitHub-Last-Rev: 085bbc55dbc95d55456cc2acc46a0d02416c2848
GitHub-Pull-Request: golang/go#54321
Reviewed-on: https://go-review.googlesource.com/c/go/+/422154
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Run-TryBot: Than McIntosh &lt;thanm@google.com&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: use ":" for compiler generated symbols</title>
<updated>2022-08-09T11:28:56Z</updated>
<author>
<name>Cuong Manh Le</name>
<email>cuong.manhle.vn@gmail.com</email>
</author>
<published>2021-05-07T17:45:06Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0f8dffd0aa71ed996d32e77701ac5ec0bc7cde01'/>
<id>urn:sha1:0f8dffd0aa71ed996d32e77701ac5ec0bc7cde01</id>
<content type='text'>
As it can't appear in user package paths.

There is a hack for handling "go:buildid" and "type:*" on windows/386.

Previously, windows/386 requires underscore prefix on external symbols,
but that's only applied for SHOSTOBJ/SUNDEFEXT or cgo export symbols.
"go.buildid" is STEXT, "type.*" is STYPE, thus they are not prefixed
with underscore.

In external linking mode, the external linker can't resolve them as
external symbols. But we are lucky that they have "." in their name,
so the external linker see them as Forwarder RVA exports. See:

 - https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#export-address-table
 - https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=ld/pe-dll.c;h=e7b82ba6ffadf74dc1b9ee71dc13d48336941e51;hb=HEAD#l972)

This CL changes "." to ":" in symbols name, so theses symbols can not be
found by external linker anymore. So a hacky way is adding the
underscore prefix for these 2 symbols. I don't have enough knowledge to
verify whether adding the underscore for all STEXT/STYPE symbols are
fine, even if it could be, that would be done in future CL.

Fixes #37762

Change-Id: I92eaaf24c0820926a36e0530fdb07b07af1fcc35
Reviewed-on: https://go-review.googlesource.com/c/go/+/317917
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
Run-TryBot: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>all: use io.Seek* instead of deprecated os.SEEK_*</title>
<updated>2022-08-08T17:01:54Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2022-08-05T09:37:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0a86cd6857b9fb12a798b3dbcfb6974384aa07d6'/>
<id>urn:sha1:0a86cd6857b9fb12a798b3dbcfb6974384aa07d6</id>
<content type='text'>
These are available since Go 1.7. The version used for bootstrap is Go
1.17 for Go 1.20.

For #44505

Change-Id: I497c9f617baefdeb273cd115b08b6e31bd10aad2
Reviewed-on: https://go-review.googlesource.com/c/go/+/421634
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/link: remove name expansion logic</title>
<updated>2022-05-12T18:45:57Z</updated>
<author>
<name>Cherry Mui</name>
<email>cherryyz@google.com</email>
</author>
<published>2022-05-06T17:52:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e3f7816f0eae375d261e35d0b541a61c463c9111'/>
<id>urn:sha1:e3f7816f0eae375d261e35d0b541a61c463c9111</id>
<content type='text'>
Now both the compiler and the assembler require the -p flag and
emit full package path in symbol names, we no longer need to do
the name expansion in the linker. Delete it.

Change-Id: I771d4d97987a0a17414881b52806d600ef4cc351
Reviewed-on: https://go-review.googlesource.com/c/go/+/404300
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>cmd/link: preserve symbol attributes when cloning to external</title>
<updated>2022-04-15T19:02:54Z</updated>
<author>
<name>Cherry Mui</name>
<email>cherryyz@google.com</email>
</author>
<published>2022-04-15T15:52:01Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=df08c9a82152fd6f2b2811db03b40fea8b6e5e9e'/>
<id>urn:sha1:df08c9a82152fd6f2b2811db03b40fea8b6e5e9e</id>
<content type='text'>
There are some symbol attributes that are encoded in the object
file. Currently, they are lost when cloning a symbol to external.
Copy them over.

Also delete CopyAttributes as it is no longer called anywhere.

Change-Id: I1497e3223a641704bf35aa3e904dd0eda2f8ec3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/400574
Run-TryBot: Cherry Mui &lt;cherryyz@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Than McIntosh &lt;thanm@google.com&gt;
</content>
</entry>
<entry>
<title>all: gofmt main repo</title>
<updated>2022-04-11T16:34:30Z</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2022-02-03T19:12:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=19309779ac5e2f5a2fd3cbb34421dafb2855ac21'/>
<id>urn:sha1:19309779ac5e2f5a2fd3cbb34421dafb2855ac21</id>
<content type='text'>
[This CL is part of a sequence implementing the proposal #51082.
The design doc is at https://go.dev/s/godocfmt-design.]

Run the updated gofmt, which reformats doc comments,
on the main repository. Vendored files are excluded.

For #51082.

Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407
Reviewed-on: https://go-review.googlesource.com/c/go/+/384268
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
</entry>
</feed>
