[Git][ghc/ghc][wip/romes/rts-linker-direct-symbol-lookup] 32 commits: rts: fix clang compilation on aarch64

Rodrigo Mesquita (@alt-romes) gitlab at gitlab.haskell.org
Wed Mar 27 17:38:34 UTC 2024



Rodrigo Mesquita pushed to branch wip/romes/rts-linker-direct-symbol-lookup at Glasgow Haskell Compiler / GHC


Commits:
7db8c992 by Cheng Shao at 2024-03-25T13:45:46-04:00
rts: fix clang compilation on aarch64

This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h
which causes "error: address argument to atomic operation must be a
pointer to _Atomic type" when compiling with clang on aarch64.

- - - - -
237194ce by Sylvain Henry at 2024-03-25T13:46:27-04:00
Lexer: fix imports for Alex 3.5.1 (#24583)

- - - - -
810660b7 by Cheng Shao at 2024-03-25T22:19:16-04:00
libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6

This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which
includes numerous upstream libffi fixes, especially
https://github.com/libffi/libffi/issues/760.

- - - - -
d2ba41e8 by Alan Zimmerman at 2024-03-25T22:19:51-04:00
EPA: do not duplicate comments in signature RHS

- - - - -
32a8103f by Rodrigo Mesquita at 2024-03-26T21:16:12-04:00
configure: Use LDFLAGS when trying linkers

A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
check for a working linker. If either of these fail, we try the next in
line.

However, we were not considering the `$LDFLAGS` when checking if these
linkers worked. So we would pick a linker that does not support the
current $LDFLAGS and fail further down the line when we used that linker
with those flags.

Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
supported by `ld.gold` but that was being picked still.

- - - - -
bf65a7c3 by Rodrigo Mesquita at 2024-03-26T21:16:48-04:00
bindist: Clean xattrs of bin and lib at configure time

For issue #21506, we started cleaning the extended attributes of
binaries and libraries from the bindist *after* they were installed to
workaround notarisation (#17418), as part of `make install`.

However, the `ghc-toolchain` binary that is now shipped with the bindist
must be run at `./configure` time. Since we only cleaned the xattributes
of the binaries and libs after they were installed, in some situations
users would be unable to run `ghc-toolchain` from the bindist, failing
at configure time (#24554).

In this commit we move the xattr cleaning logic to the configure script.

Fixes #24554

- - - - -
cfeb70d3 by Rodrigo Mesquita at 2024-03-26T21:17:24-04:00
Revert "NCG: Fix a bug in jump shortcutting."

This reverts commit 5bd8ed53dcefe10b72acb5729789e19ceb22df66.

Fixes #24586

- - - - -
13223f6d by Serge S. Gulin at 2024-03-27T07:28:51-04:00
JS: `h$rts_isProfiled` is removed from `profiling` and left its version at
`rts/js/config.js`

- - - - -
0acfe391 by Alan Zimmerman at 2024-03-27T07:29:27-04:00
EPA: Do not extend declaration range for trailine zero len semi

The lexer inserts virtual semicolons having zero width.
Do not use them to extend the list span of items in a list.

- - - - -
94d396f3 by Rodrigo Mesquita at 2024-03-27T11:53:10+00:00
rts: free error message before returning

Fixes a memory leak in rts/linker/PEi386.c

- - - - -
6107040e by Rodrigo Mesquita at 2024-03-27T11:53:10+00:00
Start writing test

- - - - -
295a9a91 by Alexis King at 2024-03-27T11:53:10+00:00
wip: avoid linear search when looking up Haskell symbols via dlsym

- - - - -
83145dd0 by Alexis King at 2024-03-27T11:53:10+00:00
wip: make addDLL wrapper around loadNativeObj

- - - - -
501b965d by Alexis King at 2024-03-27T11:53:10+00:00
wip: use loadNativeObj to implement addDLL

- - - - -
1c9e9080 by Rodrigo Mesquita at 2024-03-27T11:53:10+00:00
Refactor loadNativeObj_ELF to _POSIX and delete dl_mutex

CPP Support loadNativeObj in MachO

- - - - -
3b3bfb27 by Rodrigo Mesquita at 2024-03-27T16:14:49+00:00
Note down thing we need to refactor because of duplication

- - - - -
c0f52819 by Rodrigo Mesquita at 2024-03-27T16:14:49+00:00
Fail if no symbol is found in the relevant DLLs

- - - - -
380d490e by Rodrigo Mesquita at 2024-03-27T16:54:32+00:00
Revert "Fail if no symbol is found in the relevant DLLs"

This reverts commit c0f528199ae6000750ee0a220cebe005e24a753d.

- - - - -
7abdbcf7 by Rodrigo Mesquita at 2024-03-27T16:58:10+00:00
Use symbol cache in internal interpreter too

This commit makes the symbol cache that was used by the external
interpreter available for the internal interpreter too.

This follows from the analysis in #23415 that suggests the internal
interpreter could benefit from this cache too, and that there is no good
reason not to have the cache for it too. It also makes it a bit more
uniform to have the symbol cache range over both the internal and
external interpreter.

This commit also refactors the cache into a function which is used by
both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the
caching logic to `lookupSymbolInDLL` too.

- - - - -
3d6c9c3a by Rodrigo Mesquita at 2024-03-27T16:58:10+00:00
Use lookupHsSymbol for PrimOps too

- - - - -
f0e072c9 by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
Implement lookupSymbolInDLL for ExternalInterp

- - - - -
19a86c6a by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
Write Note [Looking up symbols in the relevant objects]

- - - - -
831d1af0 by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
VERY GOOD -3.5 seconds, instant main

- - - - -
c7d00128 by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
another potential perf improv

- - - - -
90a9b715 by Matthew Pickering at 2024-03-27T16:58:11+00:00
Add support for ghc-debug to ghc executable

- - - - -
810f7572 by Fendor at 2024-03-27T16:58:11+00:00
Bump ghc-debug submodule

- - - - -
61a3225d by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
Debug traces

- - - - -
e6ebb068 by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
Revert "Debug traces"

This reverts commit 6d409089abb02ea4cf6b3334206d0eb37b3550fd.

- - - - -
eb01dd6b by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
Attempt refactor ObjsLoaded instead of LinkableSet

- - - - -
a0f51f5f by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
Revert "Attempt refactor ObjsLoaded instead of LinkableSet"

This reverts commit f66191bea1e0218faefe2ce748ff604d1e549817.

- - - - -
2a31aec5 by Rodrigo Mesquita at 2024-03-27T16:58:11+00:00
misc comments

- - - - -
fdab3e60 by Rodrigo Mesquita at 2024-03-27T17:37:34+00:00
Write Note [Symbols may not be found in pkgs_loaded]

- - - - -


30 changed files:

- .gitmodules
- + T23415/Makefile
- + T23415/main.hs
- + T23415/make_shared_libs.sh
- + T23415/new-main.hs
- + T23415/run_test.sh
- compiler/GHC.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Instr.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
- compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Plugins.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/Linker/MacOS.hs
- compiler/GHC/Linker/Types.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/Runtime/Interpreter/JS.hs
- compiler/GHC/Runtime/Interpreter/Types.hs
- distrib/configure.ac.in
- + ghc-debug
- ghc/Main.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/638e7bc233658597898fa368ac0e68833223f661...fdab3e60cb3cce2b154928c29ca136cbb4f15131

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/638e7bc233658597898fa368ac0e68833223f661...fdab3e60cb3cce2b154928c29ca136cbb4f15131
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240327/d3a1137c/attachment-0001.html>


More information about the ghc-commits mailing list