History log of /llvm-project/llvm/lib/MC/MachObjectWriter.cpp (Results 1 – 25 of 296)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# d73d5c8c 15-Nov-2024 Kazu Hirata <kazu@google.com>

[MC] Remove unused includes (NFC) (#116317)

Identified with misc-include-cleaner.


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4
# fd4f9520 20-Aug-2024 Ahmed Bougacha <ahmed@bougacha.org>

[AArch64][MachO] Add ptrauth ABI version to arm64e cpusubtype. (#104650)

In a mach_header, the cpusubtype is a 32-bit field, but it's split in 2
subfields:
- the low 24 bits containing the cpu sub

[AArch64][MachO] Add ptrauth ABI version to arm64e cpusubtype. (#104650)

In a mach_header, the cpusubtype is a 32-bit field, but it's split in 2
subfields:
- the low 24 bits containing the cpu subtype proper, (e.g.,
CPU_SUBTYPE_ARM64E 2)
- the high 8 bits containing a capability field used for additional
feature flags.

Notably, it's only the subtype subfield that participates in fat file
slice discrimination: the caps are ignored.

arm64e uses the caps subfield to encode a ptrauth ABI version:
- 0x80 (CPU_SUBTYPE_PTRAUTH_ABI) denotes a versioned binary
- 0x40 denotes a kernel-ABI binary
- 0x00-0x0F holds the ptrauth ABI version

This teaches the basic obj tools to decode that (or ignore it when
unneeded).

It also teaches the MachO writer to default to emitting versioned
binaries, but with a version of 0 (and without the kernel ABI flag).

Modern arm64e requires versioned binaries: a binary with 0x00 caps in
cpusubtype is now rejected by the linker and everything after. We can
live without the sophistication of specifying the version and kernel ABI
for now.

Co-authored-by: Francis Visoiu Mistrih <francisvm@apple.com>

show more ...


Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1
# f729c09c 24-Jul-2024 Fangrui Song <i@maskray.me>

MC: Inline createMachObjectWriter into MCAsmBackend

We could do the same to COFF once WinCOFFObjectWriter is cleaned up
(#100303).


Revision tags: 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


# a10570ba 17-Jul-2024 Eli Friedman <efriedma@quicinc.com>

[MachO] Detect overflow in section offset. (#98685)

The section offset field is only 32 bits; if the computed section offset
is larger, make sure we don't emit a corrupt object file.


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

MCAssembler: Remove unneeded non-const iterators for Sections and misleading size()

The pointers cannot be mutated even if the dereferenced MCSection can.


# 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


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

[MC,MachO] Simplify IndirectSybols


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

[MC] Move MCAssembler::isSymbolLinkerVisible to MCSymbolMachO


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

Move MCSection::LayoutOrder to MCSectionMachO

This variable is similar to `Ordinal` but only used for Mach-O to place
zerofill sections ("virtual sections" in MC term) after non-zerofill ones.

Foll

Move MCSection::LayoutOrder to MCSectionMachO

This variable is similar to `Ordinal` but only used for Mach-O to place
zerofill sections ("virtual sections" in MC term) after non-zerofill ones.

Follow-up to 7840c0066837797cdeb62aab63044b964aa7f372.

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

show more ...


# 4ba99569 02-Jul-2024 Fangrui Song <i@maskray.me>

MachObjectWriter: replace the MCAsmLayout parameter with MCAssembler


# e25e8003 01-Jul-2024 Fangrui Song <i@maskray.me>

MCExpr::evaluateAsRelocatable: replace the MCAsmLayout parameter with MCAssembler

Continue the MCAsmLayout removal work started by 67957a45ee1ec42ae1671cdbfa0d73127346cc95.


# c686f0cc 01-Jul-2024 Fangrui Song <i@maskray.me>

MachObjectWrite::reset: clear SectionAddress and SectionOrder

Otherwise llvm/test/MC/MachO/empty-twice.ll might fail.

Fixes: 7840c0066837797cdeb62aab63044b964aa7f372 ("[MC] Move MCAsmLayout::Sectio

MachObjectWrite::reset: clear SectionAddress and SectionOrder

Otherwise llvm/test/MC/MachO/empty-twice.ll might fail.

Fixes: 7840c0066837797cdeb62aab63044b964aa7f372 ("[MC] Move MCAsmLayout::SectionOrder to MachObjectWriter::SectionOrder")

show more ...


# 7840c006 01-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Move MCAsmLayout::SectionOrder to MachObjectWriter::SectionOrder

Follow-up to 2c1fb411ce3aed148a278660d215e0f88ff9b9be.

SectionOrder is Mach-O specific to place zerofill sections after
non-zer

[MC] Move MCAsmLayout::SectionOrder to MachObjectWriter::SectionOrder

Follow-up to 2c1fb411ce3aed148a278660d215e0f88ff9b9be.

SectionOrder is Mach-O specific to place zerofill sections after
non-zerofill sections in the object writer.

show more ...


# dbf12b2f 01-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Remove MCAsmLayout::{getSymbolOffset,getBaseSymbol}

The MCAsmLayout::* forwarders added by
67957a45ee1ec42ae1671cdbfa0d73127346cc95 have all been removed.


# a40ca78b 01-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Remove MCAsmLayout::{getSectionFileSize,getSectionAddressSize}


# a5e905b7 01-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Remove MCAsmLayout::getFragmentAddress


# 6b707a8c 01-Jul-2024 Fangrui Song <i@maskray.me>

[MC] Remove the MCAsmLayout parameter from MCObjectWriter::executePostLayoutBinding


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

[MC] Remove the MCAsmLayout parameter from MCObjectWriter::{writeObject,writeSectionData}


12345678910>>...12