Skip to content

Conversation

@joker-eph
Copy link
Collaborator

Reverts #98158

bot is broken.

@joker-eph joker-eph added the skip-precommit-approval PR for CI feedback, not intended for review label Jul 11, 2024
@llvmbot llvmbot added the llvm:mc Machine (object) code label Jul 11, 2024
@joker-eph joker-eph merged commit c026135 into main Jul 11, 2024
@joker-eph joker-eph deleted the revert-98158-llvm-elfosabi-openbsd branch July 11, 2024 15:16
@llvmbot
Copy link
Member

llvmbot commented Jul 11, 2024

@llvm/pr-subscribers-mc

Author: Mehdi Amini (joker-eph)

Changes

Reverts llvm/llvm-project#98158

bot is broken.


Full diff: https://github.com/llvm/llvm-project/pull/98494.diff

2 Files Affected:

  • (modified) llvm/include/llvm/MC/MCELFObjectWriter.h (-2)
  • (modified) llvm/test/MC/ELF/osabi.s (-4)
diff --git a/llvm/include/llvm/MC/MCELFObjectWriter.h b/llvm/include/llvm/MC/MCELFObjectWriter.h
index 12237094ad86a..d7c223cdcc07f 100644
--- a/llvm/include/llvm/MC/MCELFObjectWriter.h
+++ b/llvm/include/llvm/MC/MCELFObjectWriter.h
@@ -78,8 +78,6 @@ class MCELFObjectTargetWriter : public MCObjectTargetWriter {
         return ELF::ELFOSABI_FREEBSD;
       case Triple::Solaris:
         return ELF::ELFOSABI_SOLARIS;
-      case Triple::OpenBSD:
-        return ELF::ELFOSABI_OPENBSD;
       default:
         return ELF::ELFOSABI_NONE;
     }
diff --git a/llvm/test/MC/ELF/osabi.s b/llvm/test/MC/ELF/osabi.s
index 44912f4987c11..dc6ad2a349d75 100644
--- a/llvm/test/MC/ELF/osabi.s
+++ b/llvm/test/MC/ELF/osabi.s
@@ -10,7 +10,3 @@
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd %s | llvm-readobj -h - | \
 # RUN:   FileCheck %s --check-prefix=FREEBSD
 # FREEBSD: OS/ABI: FreeBSD
-
-# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-openbsd %s | llvm-readobj -h - | \
-# RUN:   FileCheck %s --check-prefix=OPENBSD
-# OPENBSD: OS/ABI: OpenBSD

Ericson2314 added a commit that referenced this pull request Jul 11, 2024
This matches what is done for FreeBSD.

OpenBSD has a few special program header types, and other such ELF
extensions. Setting the ELFOSABI like so will allow LLD to support them
without needlessly impacting non-OpenBSD ELFs.

Testing strategy matches 06cecdc.

Take two of #98158 / b64c1de, which was
reverted in #98494 / c026135.
Preexisting test is fixed now.
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
This matches what is done for FreeBSD.

OpenBSD has a few special program header types, and other such ELF
extensions. Setting the ELFOSABI like so will allow LLD to support them
without needlessly impacting non-OpenBSD ELFs.

Testing strategy matches 06cecdc.

Take two of llvm#98158 / b64c1de, which was
reverted in llvm#98494 / c026135.
Preexisting test is fixed now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:mc Machine (object) code skip-precommit-approval PR for CI feedback, not intended for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants