https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577
--- Comment #177 from dave.anglin at bell dot net --- On 2020-02-13 6:01 p.m., peter.bisroev at groundlabs dot com wrote: > I have tried playing around with weak using aCC, however even though it > accepts > both attribute and pragma (and complains if you misspell "weak"), both > compiler > and linker seem to ignore it. But I might have made some mistake there, will > double check tonight. Did you look at .s output? You could also test a simple program with a weak function in two objects. My sense is the situation will be similar to hppa64-hpux11. Weak is partially supported in that calls to a weak function resolve to a single instance. However, undefined weak is not really supported. While the linker errors can be overridden, the dynamic linker will object to applications with undefined weak symbols. We worked around this with a libgcc_stub.a library and a linker script. HP ld also probably leaves all the instances of weak linkonce functions contributing to bloat.