Page MenuHomePhabricator

Bug 1844484 - Override the symbol used by compilers in vtables for pure virtual methods.
ClosedPublic

Authored by glandium on Jul 20 2023, 2:44 AM.
Referenced Files
Unknown Object (File)
Sun, Oct 12, 7:19 PM
Unknown Object (File)
Fri, Oct 10, 8:18 PM
Unknown Object (File)
Wed, Sep 24, 10:37 AM
Unknown Object (File)
Jul 16 2025, 2:06 PM
Unknown Object (File)
May 24 2025, 3:37 PM
Unknown Object (File)
Jan 5 2025, 3:16 PM
Unknown Object (File)
Jan 5 2025, 10:43 AM
Unknown Object (File)
Jan 4 2025, 11:07 PM

Details

Summary

In bug 1839743, we made the build system prefer packed relative
relocations to elfhack when both the system libc and linker support
them. Unfortunately, while that covers most of the benefits from
elfhack, it doesn't cover bug 651892.

To cover it, we make every C++ executable contain its own copy of
the symbol, so that all relocations related to it become relative.

And because this is actually (slightly) beneficial on macos, and because
it's also an advantage to have our own abort called rather than the
system's, we apply the same to all platforms.

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
nalexander added a subscriber: nalexander.
nalexander added inline comments.
build/pure_virtual/pure_virtual.c
12
This revision is now accepted and ready to land.Jul 20 2023, 2:53 AM
This revision is now accepted and ready to land.Jul 20 2023, 4:27 AM
This revision is now accepted and ready to land.Jul 20 2023, 9:27 AM
This revision is now accepted and ready to land.Jul 21 2023, 1:11 AM
glandium added 1 blocking reviewer(s): nalexander.

As this requires a kind of gross hack (short of doing something much more involved), I'd rather get another round or review.

This revision is now accepted and ready to land.Aug 1 2023, 5:31 AM
This revision is now accepted and ready to land.Aug 1 2023, 12:19 PM