As we discussed in the last meeting, we reset the ports tree and began from scratch, even though this change involves porting all the packages. Starting small and growing gradually, this approach will reduce build times and consequently lower energy consumption in a world affected by climate change. We will add new ports as users needs arise; ok h3artbl33d@
This commit is contained in:
parent
83a0aaf92c
commit
9a3af55370
59377 changed files with 98673 additions and 4712155 deletions
|
@ -9,7 +9,29 @@ Index: lld/ELF/Writer.cpp
|
|||
ElfSym::end1 = add("end", -1);
|
||||
ElfSym::end2 = add("_end", -1);
|
||||
ElfSym::etext1 = add("etext", -1);
|
||||
@@ -798,7 +799,11 @@ static bool isRelroSection(const OutputSection *sec) {
|
||||
@@ -488,6 +489,12 @@ template <class ELFT> void elf::createSyntheticSection
|
||||
in.ibtPlt = std::make_unique<IBTPltSection>();
|
||||
add(*in.ibtPlt);
|
||||
}
|
||||
+#ifdef __OpenBSD__
|
||||
+ else if (config->emachine == EM_X86_64) {
|
||||
+ in.ibtPlt = std::make_unique<IBTPltSection>();
|
||||
+ add(*in.ibtPlt);
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
if (config->emachine == EM_PPC)
|
||||
in.plt = std::make_unique<PPC32GlinkSection>();
|
||||
@@ -652,7 +659,7 @@ static bool shouldKeepInSymtab(const Defined &sym) {
|
||||
// * --discard-locals is used.
|
||||
// * The symbol is in a SHF_MERGE section, which is normally the reason for
|
||||
// the assembler keeping the .L symbol.
|
||||
- if (sym.getName().startswith(".L") &&
|
||||
+ if ((sym.getName().startswith(".L") || sym.getName().empty()) &&
|
||||
(config->discard == DiscardPolicy::Locals ||
|
||||
(sym.section && (sym.section->flags & SHF_MERGE))))
|
||||
return false;
|
||||
@@ -798,7 +805,11 @@ static bool isRelroSection(const OutputSection *sec) {
|
||||
// However, if "-z now" is given, the lazy symbol resolution is
|
||||
// disabled, which enables us to put it into RELRO.
|
||||
if (sec == in.gotPlt->getParent())
|
||||
|
@ -21,7 +43,7 @@ Index: lld/ELF/Writer.cpp
|
|||
|
||||
// .dynamic section contains data for the dynamic linker, and
|
||||
// there's no need to write to it at runtime, so it's better to put
|
||||
@@ -1089,6 +1094,9 @@ template <class ELFT> void Writer<ELFT>::setReservedSy
|
||||
@@ -1089,6 +1100,9 @@ template <class ELFT> void Writer<ELFT>::setReservedSy
|
||||
if (ElfSym::bss)
|
||||
ElfSym::bss->section = findSection(".bss");
|
||||
|
||||
|
@ -31,7 +53,7 @@ Index: lld/ELF/Writer.cpp
|
|||
// Setup MIPS _gp_disp/__gnu_local_gp symbols which should
|
||||
// be equal to the _gp symbol's value.
|
||||
if (ElfSym::mipsGp) {
|
||||
@@ -2369,6 +2377,12 @@ SmallVector<PhdrEntry *, 0> Writer<ELFT>::createPhdrs(
|
||||
@@ -2369,11 +2383,22 @@ SmallVector<PhdrEntry *, 0> Writer<ELFT>::createPhdrs(
|
||||
addHdr(PT_GNU_EH_FRAME, part.ehFrameHdr->getParent()->getPhdrFlags())
|
||||
->add(part.ehFrameHdr->getParent());
|
||||
|
||||
|
@ -44,7 +66,17 @@ Index: lld/ELF/Writer.cpp
|
|||
// PT_OPENBSD_RANDOMIZE is an OpenBSD-specific feature. That makes
|
||||
// the dynamic linker fill the segment with random data.
|
||||
if (OutputSection *cmd = findSection(".openbsd.randomdata", partNo))
|
||||
@@ -2392,6 +2406,11 @@ SmallVector<PhdrEntry *, 0> Writer<ELFT>::createPhdrs(
|
||||
addHdr(PT_OPENBSD_RANDOMIZE, cmd->getPhdrFlags())->add(cmd);
|
||||
|
||||
+ // PT_OPENBSD_SYSCALLS is an OpenBSD-specific feature. That makes
|
||||
+ // the kernel and dynamic linker register system call sites.
|
||||
+ if (OutputSection *cmd = findSection(".openbsd.syscalls", partNo))
|
||||
+ addHdr(PT_OPENBSD_SYSCALLS, cmd->getPhdrFlags())->add(cmd);
|
||||
+
|
||||
if (config->zGnustack != GnuStackKind::None) {
|
||||
// PT_GNU_STACK is a special section to tell the loader to make the
|
||||
// pages for the stack non-executable. If you really want an executable
|
||||
@@ -2392,6 +2417,11 @@ SmallVector<PhdrEntry *, 0> Writer<ELFT>::createPhdrs(
|
||||
if (config->zWxneeded)
|
||||
addHdr(PT_OPENBSD_WXNEEDED, PF_X);
|
||||
|
||||
|
@ -56,7 +88,7 @@ Index: lld/ELF/Writer.cpp
|
|||
if (OutputSection *cmd = findSection(".note.gnu.property", partNo))
|
||||
addHdr(PT_GNU_PROPERTY, PF_R)->add(cmd);
|
||||
|
||||
@@ -2484,6 +2503,31 @@ template <class ELFT> void Writer<ELFT>::fixSectionAli
|
||||
@@ -2484,6 +2514,31 @@ template <class ELFT> void Writer<ELFT>::fixSectionAli
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue