Skip to content

Commit

Permalink
Don't emit unwind info (and fix __bzero)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher committed Dec 11, 2023
1 parent 9901843 commit ab556e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Tools/jit/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,6 @@ def _handle_section(self, section: schema.MachOSection) -> None:
flags = {flag["Name"] for flag in section["Attributes"]["Flags"]}
name = section["Name"]["Value"]
name = name.removeprefix(self.target.prefix)
if name == "_eh_frame":
return
if "SomeInstructions" in flags:
assert not self.stencil_group.data.body, self.stencil_group.data.body
self.stencil_group.text.body.extend(
Expand Down Expand Up @@ -579,6 +577,9 @@ def _handle_relocation(
addend = 0
case _:
raise NotImplementedError(relocation)
# XXX
if symbol == "__bzero":
symbol = "bzero"
return Hole(offset, kind, value, symbol, addend)


Expand Down Expand Up @@ -660,6 +661,7 @@ def get_target(host: str) -> Target:
f"-I{PYTHON}",
"-O3",
"-c",
"-fno-asynchronous-unwind-tables",
# XXX: SET_FUNCTION_ATTRIBUTE on 32-bit Windows debug builds:
"-fno-jump-tables",
# Position-independent code adds indirection to every load and jump:
Expand Down

0 comments on commit ab556e7

Please sign in to comment.