History log of /llvm-project/llvm/lib/MC/MCMachOStreamer.cpp (Results 1 – 25 of 300)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7
# 3fa5b527 22-Dec-2024 Fangrui Song <i@maskray.me>

[MC] Decrease direct access to getContents()

to make it easier to store fragment contents out-of-line. Loosely based
on Alexis Engelke's prototype.


Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3
# f1cb64b6 14-Aug-2024 Alexis Engelke <engelke@in.tum.de>

[MC] Remove Darwin SDK/Version from ObjFileInfo (#103025)

There's only a single user (MCMachOStreamer), so it makes more sense to
move the version emission to the source of the data.


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# f017d89b 23-Jul-2024 Fangrui Song <i@maskray.me>

MCAssembler: Move SubsectionsViaSymbols; to MCObjectWriter


# eb223929 23-Jul-2024 Fangrui Song <i@maskray.me>

MCAssembler: Move LinkerOptions to MachObjectWriter


# ae3c85a7 23-Jul-2024 Fangrui Song <i@maskray.me>

MCAssembler: Move CGProfile to MCObjectWriter


# 09a399a1 21-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move VersionInfo to MachObjectWriter


# a2af3755 21-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move LOHContainer to MachObjectwriter


# e299b163 21-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move isPrivateExtern to MCSymbolMachO


# aa86f4f1 20-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Remove unnecessary DWARFMustBeAtTheEnd check

36a15cb975334403216e6145d4abece3026af17a introduced the
DWARFMustBeAtTheEnd check to ensure DWARF sections were placed after all
text sections to he

[MC] Remove unnecessary DWARFMustBeAtTheEnd check

36a15cb975334403216e6145d4abece3026af17a introduced the
DWARFMustBeAtTheEnd check to ensure DWARF sections were placed after all
text sections to help avoid out-of-range branches for Darwin ARM. The
commit removed a Darwin ARM hack from
20e5f5ed7930efdf2bd34bf099f24ac88798c5ea (2009), likely due to a
no-longer-relevant assembler limitation.

However, this check is no longer relevant due to the following:

* Our CodeGen approach reliably places DWARF sections at the end.
* Darwin AArch32 is less relevant today.

Removing this check also addresses a minor clang cc1as crash that could
occur when text sections were placed after DWARF sections
(e9ad54b3ee905ea3a77c35ca7d6e843b2c552e0b (2015)).

show more ...


# 5f1bb62c 10-Jul-2024 Ahmed Bougacha <ahmed@bougacha.org>

[AArch64][PAC] Lower ptrauth constants in code for MachO. (#97665)

This also adds support for auth stubs on MachO using __DATA,__auth_ptr.

Some of the machinery for auth stubs is already implemen

[AArch64][PAC] Lower ptrauth constants in code for MachO. (#97665)

This also adds support for auth stubs on MachO using __DATA,__auth_ptr.

Some of the machinery for auth stubs is already implemented; this
generalizes that a bit to support MachO, and moves some of the shared
logic into MMIImpls.

In particular, this originally had an AuthStubInfo struct, but we no
longer need it beyond a single MCExpr. So this provides variants of
the symbol stub helper type declarations and functions for "expr
stubs", where a stub points at an arbitrary MCExpr, rather than
a simple MCSymbol (and a bit).

show more ...


# 009082aa 05-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move MCAssembler::DataRegions to MachObjectWriter

and make some cleanup.


# 1d4d92d1 05-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move MCAssembler::IndirectSymbols to MachObjectWriter


# 94471e73 04-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move MCAssembler::isSymbolLinkerVisible to MCSymbolMachO


# 21276fd7 02-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Don't treat altentry symbols as atoms

The current `setAtom` is inaccurate: a `.alt_entry` label can also be
recognized as an atom. This is mostly benign, but might cause two
locations only sepa

[MC] Don't treat altentry symbols as atoms

The current `setAtom` is inaccurate: a `.alt_entry` label can also be
recognized as an atom. This is mostly benign, but might cause two
locations only separated by an `.alt_entry` to have different atoms.

https://reviews.llvm.org/D153167 changed a `evaluateKnownAbsolute` to
`evaluateAsAbsolute` and would not fold `A-B` even if they are only
separated by a `.alt_entry` label, leading to a spurious error
`invalid CFI advance_loc expression`.

The fix is similar to #82268: add a special case for `.alt_entry`.

Fix #97116

Pull Request: https://github.com/llvm/llvm-project/pull/97479

show more ...


# 66518ad7 30-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Remove addFragment. NFC

This was introduced in dcb71c06c7b059e313f22e46bc9c41343a03f1eb to help
migrate away raw `operator new` and refactor the fragment
representation.

This is now unneeded a

[MC] Remove addFragment. NFC

This was introduced in dcb71c06c7b059e313f22e46bc9c41343a03f1eb to help
migrate away raw `operator new` and refactor the fragment
representation.

This is now unneeded after `MCStreamer::CurFrag` and
`MCSection::CurFragList` refactoring.

show more ...


# abbf3bce 23-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Avoid some registerSection calls

changeSection is preferred to call the changeSectionImpl hook, which
registers the section symbol.


# 21fac2d1 23-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Ensure all new sections have a MCDataFragment

MCAssembler::layout ensures that every section has at least one
fragment, which simplifies MCAsmLayout::getSectionAddressSize (see
e73353c7201a3080

[MC] Ensure all new sections have a MCDataFragment

MCAssembler::layout ensures that every section has at least one
fragment, which simplifies MCAsmLayout::getSectionAddressSize (see
e73353c7201a3080851d99a16f5fe2c17f7697c6 from 2010). It's better to
ensure the condition is satisfied at create time (COFF, GOFF, Mach-O) to
simplify more fragment processing.

show more ...


# 95f983f8 23-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Change Subsection parameters from const MCExpr * to uint32_t

Follow-up to 05ba5c0648ae5e80d5afce270495bf3b1eef9af4. uint32_t is
preferred over const MCExpr * in the section stack uses because i

[MC] Change Subsection parameters from const MCExpr * to uint32_t

Follow-up to 05ba5c0648ae5e80d5afce270495bf3b1eef9af4. uint32_t is
preferred over const MCExpr * in the section stack uses because it
should only be evaluated once. Change the paramter type to match.

show more ...


Revision tags: llvmorg-18.1.8
# f808abf5 14-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Add MCFragment allocation helpers

`allocFragment` might be changed to a placement new when the allocation
strategy changes.

`allocInitialFragment` is to deduplicate the following pattern
```

[MC] Add MCFragment allocation helpers

`allocFragment` might be changed to a placement new when the allocation
strategy changes.

`allocInitialFragment` is to deduplicate the following pattern
```
auto *F = new MCDataFragment();
Result->addFragment(*F);
F->setParent(Result);
```

Pull Request: https://github.com/llvm/llvm-project/pull/95197

show more ...


# 27588fe2 13-Jun-2024 Fangrui Song <i@maskray.me>

[MC] Move MCFragment::Atom to MCSectionMachO::Atoms

Mach-O's `.subsections_via_symbols` mechanism associates a fragment with
an atom (a non-temporary defined symbol). The current approach
(`MCFragme

[MC] Move MCFragment::Atom to MCSectionMachO::Atoms

Mach-O's `.subsections_via_symbols` mechanism associates a fragment with
an atom (a non-temporary defined symbol). The current approach
(`MCFragment::Atom`) wastes space for other object file formats.

After #95077, `MCFragment::LayoutOrder` is only used by
`AttemptToFoldSymbolOffsetDifference`. While it could be removed, we
might explore future uses for `LayoutOrder`.

@aengelke suggests one use case: move `Atom` into MCSection. This works
because Mach-O doesn't support `.subsection`, and `LayoutOrder`, as the
index into the fragment list, is unchanged.

This patch moves MCFragment::Atom to MCSectionMachO::Atoms. `getAtom`
may be called at parse time before `Atoms` is initialized, so a bound
checking is needed to keep the hack working.

Pull Request: https://github.com/llvm/llvm-project/pull/95341

show more ...


Revision tags: llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5
# 4e340356 25-Apr-2024 Fangrui Song <i@maskray.me>

[MC] Remove RelaxAll parameters from create*Streamer

Related to clean-up opportunities discussed at #90013.

After these cleanups, the `RelaxAll` parameter from
`createMCObjectStreamer` can be remov

[MC] Remove RelaxAll parameters from create*Streamer

Related to clean-up opportunities discussed at #90013.

After these cleanups, the `RelaxAll` parameter from
`createMCObjectStreamer` can be removed as well. As
`createMCObjectStreamer` is a more user-facing API and used by two files
in mlir/, we postpone the cleanup to the future.

show more ...


# 45b59cb1 25-Apr-2024 Fangrui Song <i@maskray.me>

[MC] Move setRelaxAll() calls to MCObjectStreamer

Related to clean-up opportunities discussed at #90013.


Revision tags: llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2
# 7198bacc 17-Apr-2023 Eli Friedman <efriedma@quicinc.com>

[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols

This is mostly useful for ARM64EC, which uses such symbols extensively.

One interesting quirk of ARM64EC is that we need

[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols

This is mostly useful for ARM64EC, which uses such symbols extensively.

One interesting quirk of ARM64EC is that we need to be able to emit weak
symbols that point at each other (so if either symbol is defined
elsewhere, both symbols point at the definition). This handling is
currently restricted to weak_anti_dep symbols, because we depend on the
current behavior of resolving weak symbols in some cases.

Differential Revision: https://reviews.llvm.org/D145208

show more ...


# 01260bbc 05-May-2023 Fangrui Song <i@maskray.me>

[MC] registerSymbol: change an output paramter to return value


# 439f804c 27-Apr-2023 Zequan Wu <zequanwu@google.com>

Revert "[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols"

This reverts commit 10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2. It causes undefined symbol error on chromium windo

Revert "[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols"

This reverts commit 10c17c97ebaf81ac26f6830e51a7a57ddcf63cd2. It causes undefined symbol error on chromium windows build. A small repro was uploaded to the code review.

show more ...


12345678910>>...12