diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2022-10-29 21:30:08 -0700 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2022-10-29 21:30:08 -0700 |
commit | 6521defb406ba8e7217342852a046998332d356c (patch) | |
tree | b4ce2fa85e6e759073afcaee30301e3b5b335f2d | |
parent | 0d528688fe40e9703463b27f27c4dbe485e229a0 (diff) | |
download | libcap-6521defb406ba8e7217342852a046998332d356c.tar.gz |
Minor clean ups of the contrib/bug216610 code/docs
I generated mirror on github to conveniently see the .md docs and
found a few typos.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r-- | contrib/bug216610/README.md | 5 | ||||
-rwxr-xr-x | contrib/bug216610/gcc_linux_amd64.sh | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/contrib/bug216610/README.md b/contrib/bug216610/README.md index a05a828..c158161 100644 --- a/contrib/bug216610/README.md +++ b/contrib/bug216610/README.md @@ -22,7 +22,7 @@ learned about it from a brief reference in the [Go Programming Language Wiki](https://zchee.github.io/golang-wiki/GcToolchainTricks/). -This preset directory evolved from my attempt to understand and +This present directory evolved from my attempt to understand and hopefully resolve what was going on as reported in that bug into an example of this _trick_. I was unable to resolve the problem as reported because of the aformentioned `panic` in the Go @@ -94,7 +94,8 @@ cross-sectional `%rip` based data addressing that various optimization modes of gcc like to use. Specifically, if a `R_X86_64_PC32` relocation entry made in a `.text` section is intended to map into a `.rodata.cst8` section in a generated `.syso` file, the Go linker -seems to replace this reference with a `0` offset to `(%rip)`. What +seems to [replace this reference with a `0` offset to +`(%rip)`](https://github.com/golang/go/issues/24321#issuecomment-1296084103). What our wrapper script does is rewrite the generated assembly to store these data references to the `.text` section. The Go linker has no problem with this _same section_ relative addressing. diff --git a/contrib/bug216610/gcc_linux_amd64.sh b/contrib/bug216610/gcc_linux_amd64.sh index 0f7fe83..a228c53 100755 --- a/contrib/bug216610/gcc_linux_amd64.sh +++ b/contrib/bug216610/gcc_linux_amd64.sh @@ -45,9 +45,11 @@ for arg in "$@"; do final+=("${arg}") fi done -echo final: "${final[@]}" -echo args: "${args[@]}" -echo ses: "${ses[@]}" + +#echo final: "${final[@]}" +#echo args: "${args[@]}" +#echo ses: "${ses[@]}" + "gcc" "${final[@]}" if [[ $? -ne 0 ]]; then echo "failed to compile" |