Copy relocations, canonical PLT entries and protected visibility https://t.co/qCVCVGSaZz
some actions should be taken in GCC/binutils/glibc communities
Added my third (non-alias; not a port of an existing GCC option)
driver option to Clang (12). In short, people need a way to get rid of
workarounds for GNU ld/as😹ewontfix/13 (Incorrect configure checks) may
be unhappy, but...
Refactored the article... Now that I've shared it with llvm-dev and
Linux kernel folks I have to set up a higher standard... The unfortunate
GNU ld rule was added in late 2015 so we should be able to correct
it.
Common patterns in ld: a 15+ line complex condition with different
lines touched in different decades (...and most conditions are not
tested)🤭Anyway, I am glad Alan accepted my -z start-stop-gc option:) https://t.co/gi2fSKt79u
又要展示了,打算提取 Linker garbage collection的基础部分,和Metadata
sections, COMDAT and SHF_LINK_ORDER的基础到中级部分,混合成Linker
garbage collection and metadata sections。不知道明天能不能写完The dark
side of RISC-V linker relaxation(还在思考标题)
clang++ --target=aarch64-linux-gnu just works. Debian
g++-multiarch-incdir.diff一言难尽,Arch Linux MULTILIB_OSDIRNAMES
patch也没好到哪里去(需要-B/usr/aarch64-linux-gnu/lib)……用上游,少补丁,不好吗😭
https://t.co/3HYYxv4ZBU
All about都是写得很认真的。。求斧正🙏 前几天有人发了Debian bug
#992796 并来信询问我All about symbol
versioning怎么没有提到ABS符号(已经补上了😳) https://t.co/1vB0L20XLK
还有同学在我贴这则广告前就说在阅读了,好感动啊
One giant step for me, but just one small step for glibc... Reviewer
resource is never abundant, but a little bit more amicability to a
"foreign" toolchain could have made me more pleasant in the year-long
process🙈... Anyway, glibc 2.35❤️LLD 13.0.0 https://t.co/psDmpFFlSV
@laike9m The
standard loop inversion technique. Ugh? CPython didn't have it before
3.10?😹(Wish Python's market share were taken by statically typed
language)
Add #pragma nounroll to a loop and invoke
clang -mllvm -print-before=loop-rotate -mllvm -print-after=loop-rotate -O2 -S a.c:)
My fun with FreeBSD rtld-elf: https://t.co/atcwfX6i2g . I sent a musl patch in 2019
but lack of generic-abi maintenance was a problem. (It is so close to be
maintained again)
@adhemerval
Thanks! I call RELR in a pre-standard state (pending Cary's polish of
ELF spec. It'd also be great if H.J is willing to implement the GNU ld
support... BTW: FreeBSD rtld has DT_RELR support today (https://t.co/atcwfWOHaI)
Very coarse estimate of compiler complexity/LOC https://t.co/iqRtQVU1L3
Nim is worth learning (after checking its feature list again)...
@jiyinyiyong
AST https://t.co/TDnPOGl4B0 . Not to say pattern matching is
unimportant, but better syntax/macros/compile-time functions/C interop,
and sink/let (https://t.co/khcsz7hbE3) without the burden of borrow
checking are more to me. I also appreciate a low-complexity compiler
core.
@heartpunkk
Everything needed for LLD is on https://t.co/r1PvQpgI5K (targeting to-be-released 2.35)
:) Clang needs more and I estimate that ~30 may be needed https://t.co/9U8nxK7kXD
(unfinished; still many unbuildable files)
@cooljeanius@gnutools The BDFL
of llvm-project added the option. I try not to name it directly in my
correspondence with gcc-patches... https://t.co/B5LGibVLM6 (the issue hasn't been resolved.
They aren't too fond of my longlong.h change, so perhaps I need to add
the -f option in my glibc branch)
@heartpunkk
Thanks for your recognition! Just curious, why does applying klee (or
other symbolic execution tools) on CRuby need to deal with glibc source
code?
@cooljeanius@gnutools OK, I
clarified the section https://t.co/ursx4r1UHr a bit. Chris added the
option....
@heartpunkk
Does musl work? Among the various libc implementations, I think musl has
the best code quality. Also, musl can be built with clang -flto (with a
gotcha that -u__dls2 is needed https://t.co/eIGjWm9qVe)
SeaBIOS was the worst upstream I had ever dealt with. It is ok to
keep radio silence with my lld/llvm binary utilities patch series after
~9 pings (I did the last few pings just for FreeBSD/OpenBSD) But it is
not ok to defame me.
@rui314 Symbol
versioning serves some purposes https://t.co/qqXiWVOwNK but some distros are so fond of
'time travel compatibility' and have caused a huge waste of energy.
@rui314 When I
forwarded https://t.co/CJ3CTFFOAH to FreeBSD/NetBSD folks, the
responses were basically "they don't care but if that makes Linux
(glibc) folks happy... they won't object"
@rui314 I remember
someone mentioned that for some benchmarks (say, gaming, memory
allocator with a thread-local pool), faster thread-local variables made
a difference (say, 5%). Many Mach-O extensions were added for no good
reasons as well:) https://t.co/hwaGWYez5l was complaing:)
ELF ld status report: 2500 lines of Nim, .o/.so/.a parsing with
mostly correct symbol resolution(harder than you think), infra for
linker script. This gave me an excuse to take a deep dive into ld.lld
code again and make bugfix/simplification (10KiB smaller for Release
build)... https://t.co/XlqV4GmTb1
12月3日到10日在纽约,有人约饭吗🙄
2021-12
在Ambassador Theatre (New York City)看了Chicago (musical)。Act
2查了wikipedia终于知道是干什么的了... 没有人约饭吗🤔
There is a paper for the Lavoisier portrait: Discovering the
evolution of Jacques-Louis David’s portrait of Antoine-Laurent and
Marie-Anne Pierrette Paulze Lavoisier; 2: The North Cape by Moonlight;
3: Damascus Room; 4: The Temple of Dendur https://t.co/UkeQKKoDSF
@im2gua Nim: nice
syntax, macros (better syntax than many languages), compile-time
function execution, world-class C/C++ interop, destructors, more
ergonomics than Rust style borrow checker
Majestic Theatre, New York, NY 10036 (刚刚突然发现Theater
District用的则是美式er拼法。旁边的大佬说re是从法语来的,可能较早的建筑没有改成美式er)
https://t.co/2ynu73PHjn
@yyw2000 Wow
The Book of Mormon (musical) (Eugene O'Neill Theatre, 230 W 49th St,
New York, NY 10019) https://t.co/mVZtjFrlE1
Planned blog post "Why is ld.lld slow" (why it is difficult to adopt
parallel symbol resolution & parallel relocation scanning due to
different trade-off and unfortunate things like mips/ppc64/hexagon,
sigh). Perhaps count range extension thunk, also the lack of oneTBB.
With landed and pending patches I have made this week, ld.lld
--threads={2,4,8} linking tmpfs output seems to be ~11% faster (both
clang RelWithDebInfo and a large app with no debug info) compared with
13.0.0 (no diff with previous origin/main). https://t.co/SMYCPXnKzP
@DongJony
SHF_MERGE duplicate elimination (.debug_str), symbol table
initialization, symbol resolution, scanning relocations, --gc-sections,
sorting dynamic relocations are critical in the performance of an ELF
linker. My blog post will describe these topics in depth. Stay
tuned:)
@DongJony COMDAT
and linker scripts make parallel symtab initialization/symbol resolution
difficult. mold sacrificed a bit. I think it probably should do parallel
initialization but NOT resolution to make .a .so semantics different
from the tradition (which don't matter in 99.9% cases)
@DongJony The
lack of concurrent hash map in llvm-project is a problem for several
ports of LLD. There was a topic in April and we should think about it
carefully for performance. That said, this part matters very little if
you have lots of debug information, where SHF_MERGE matters more.
@migsaldivar I
plan to write a blog post and include more details...
@delphij
先生保重
https://t.co/bytDYxx9nE Is this a good title? I want to
express that "For some passes ld.lld can be made faster when
llvm-project provides the facility. For some passes, due to different
trade-off ld.lld is difficult to keep up with mold, but ld.lld's are not
necessarily worse"
@DongJony Glad
you like it. I need to extract some explanatory paragraphs from this one
into "How to implement an ELF linker" and let "Why isn't ld.lld faster"
reference the former.
@weliveindetail mold handles the
original example I thought about. I updated https://t.co/3rxCAPBent
to include an example related to "https://t.co/aIrdrnusQI undefined + c.a lazy". I need to
think about parallel symbol resolution more carefully.
@weliveindetailhttps://t.co/7usFF3w7w3
This is my feature request in 2020. Looks like -fuse-ld=mold is
promising in GCC. I still hope they can take --ld-path, too.
@rui314 It is
aligned and protected. The first page is aligned by max-page-size while
the last page end is aligned by common-page-size. If the system page
size is larger than common-page-size, the last page may not be
mprotected. The behavior matches GNU while the layout differs.
(Made ld.lld faster by making passes conditional and slightly
improving code) Here is the 13.0.1 vs main branch comparison. There is
not much improvement when linking chrome (too many COMDAT discarded
sections, unlike many other programs), though.. https://t.co/DCqIu4UxKW
Tested switching symMap to martinus/robin-hood-hashing
unordered_flat_map, no significant difference. Tested better
SHF_MERGE|SHF_STRINGS split (https://t.co/rG8NClR3op) and switching parallel strategy
for writing sections (https://t.co/TbRYzXYjRt), no significant difference.
里面一个人以前在lwn看到,当时觉得令人尊敬的。根据某人的说法"odd that
they get a bit aggressive so quickly" (https://t.co/bWBYEmM9ta) (最近因为Why isn't ld.lld
faster被动(稍不安)涨粉了🤣反正总会被人看到的)
我是不是也太容易被激恼需要练习平静?
1/2 Fuchsia folks did not show professionalism I would expect. "Our
bot is red, our people are on vacation, you must revert." after two
weeks is wrong. "This is not NFC, you cannot commit without review" is
wrong.
It really should have been "Here is the link to the failure. It's
related to Rust (a bug) that your follow-up hasn't completely worked
around. Would you consider a temporary revert as we investigate the
proper fix?" is what I'd do if I didn't know the .init* thing.
The larger Rust ecosystem issue is its brittle LLVM connection. Many
stuff (e.g. TargetLoweringObjectFile) are misused but rolling release
people often ask too much: "our use case is important, Please revert to
make us happy" (politer than this but this captures the spirit)
MADV_DONTNEED and sharing symbol table tricks will save RSS (~17%)
for ThinLTO indexing (thx to aganea for the quick review🥳) Seems
non-contentious and I will be off the grid for few hours on Friday, so
will push them tomorrow (otherwise I usually wait a bit for Support
things). https://t.co/jN3ksstEY9
@rui314@JVApen@llvmorg I wish they
properly implement -fuse-ld=word (so that next time a new linker
appears, no need for another patch) and consider --ld-path https://t.co/ecsu4MYWVz
...
Note that -fuse-ld=/abs/path or rel/path is discouraged as
-fuse-ld=word may possibly be used to guide codegen
@DongJony I am
thinking whether reading more about lld-link and ld64.lld will be a good
investment.. Perhaps porting some of my recent lld/ELF contribution to
lld-link may be a good way to learn more about it, so just created https://t.co/12zC7qy92I
while watching some anime XD