diff --git a/Source Code/bootstrapper/Byepervisor/hen/Makefile b/Source Code/bootstrapper/Byepervisor/hen/Makefile new file mode 100644 index 0000000..24213e9 --- /dev/null +++ b/Source Code/bootstrapper/Byepervisor/hen/Makefile @@ -0,0 +1,42 @@ +PS5_HOST ?= ps5 +PS5_PORT ?= 9021 + +ELF := hen.elf +BIN := hen.bin + +CFLAGS := -std=c++11 -Wall -Werror -D_KERNEL -I./include -O2 -fno-builtin -nostdlib -fno-stack-protector -fno-plt -fPIC -Wno-error=frame-address -Wno-unused-const-variable +#SFLAGS := -nostartfiles -nostdlib -fPIC +LFLAGS := -Xlinker -T ./link.x -Wl,--build-id=none -nostartfiles + +ODIR := build +SDIR := src +CXXFILES := $(wildcard $(SDIR)/*.cpp) +SFILES := $(wildcard $(SDIR)/*.s) +OBJS := $(patsubst $(SDIR)/%.cpp, $(ODIR)/%.o, $(CXXFILES)) $(patsubst $(SDIR)/%.s, $(ODIR)/%.o, $(SFILES)) + +$(ELF): $(ODIR) $(OBJS) + $(CXX) $(ODIR)/*.o -o $(ELF) $(CFLAGS) $(LFLAGS) + objcopy -O binary $(ELF) $(BIN) + +$(ODIR)/%.o: $(SDIR)/%.cpp + $(CXX) -c -o $@ $< $(CFLAGS) + +$(ODIR)/%.o: $(SDIR)/%.s + $(AS) -c -o $@ $< $(SFLAGS) + +$(ODIR): + @mkdir $@ + +clean: + rm -f $(ELF) $(BIN) $(ODIR)/*.o + +test: $(ELF) + $(PS5_DEPLOY) -h $(PS5_HOST) -p $(PS5_PORT) $^ + +debug: $(ELF) + gdb \ + -ex "target extended-remote $(PS5_HOST):2159" \ + -ex "file $(ELF)" \ + -ex "remote put $(ELF) /data/$(ELF)" \ + -ex "set remote exec-file /data/$(ELF)" \ + -ex "start" diff --git a/Source Code/daemon/source/msg.cpp b/Source Code/daemon/source/msg.cpp index 84b8f31..fb9104f 100644 --- a/Source Code/daemon/source/msg.cpp +++ b/Source Code/daemon/source/msg.cpp @@ -119,7 +119,7 @@ struct NonStupidIovec { : iov_base(str), iov_length(length) {} }; -constexpr NonStupidIovec operator"" _iov(const char *str, unsigned long len) { +constexpr NonStupidIovec operator""_iov(const char *str, unsigned long len) { return {str, len + 1}; } static bool remount(const char *dev, const char *path, int mnt_flag) { diff --git a/Source Code/include/util.hpp b/Source Code/include/util.hpp index 376aafc..a8f3d95 100644 --- a/Source Code/include/util.hpp +++ b/Source Code/include/util.hpp @@ -839,7 +839,7 @@ class Vector { constexpr void pop_back() noexcept { last--; if constexpr(!__is_trivially_destructible(T)) { - *last.~T(); + (*last)->~T(); } } diff --git a/Source Code/lib/libmprotect.h b/Source Code/lib/libmprotect.h index ee5e6ed..79a2ab2 100644 --- a/Source Code/lib/libmprotect.h +++ b/Source Code/lib/libmprotect.h @@ -3,7 +3,7 @@ #include "ps5/kernel.h" #include - +/* static const unsigned long KERNEL_OFFSET_PROC_P_VMSPACE = 0x200; static unsigned long KERNEL_OFFSET_VMSPACE_P_ROOT = 0x1c8; @@ -159,3 +159,4 @@ static int kernel_mprotect(int pid, unsigned long addr, unsigned long len, int p return -1; } +*/ diff --git a/Source Code/shellui/include/json.hpp b/Source Code/shellui/include/json.hpp index 4d1a37a..38840eb 100644 --- a/Source Code/shellui/include/json.hpp +++ b/Source Code/shellui/include/json.hpp @@ -24311,7 +24311,7 @@ inline namespace json_literals /// @brief user-defined string literal for JSON values /// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json/ JSON_HEDLEY_NON_NULL(1) -inline nlohmann::json operator "" _json(const char* s, std::size_t n) +inline nlohmann::json operator""_json(const char* s, std::size_t n) { return nlohmann::json::parse(s, s + n); } @@ -24319,7 +24319,7 @@ inline nlohmann::json operator "" _json(const char* s, std::size_t n) /// @brief user-defined string literal for JSON pointer /// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json_pointer/ JSON_HEDLEY_NON_NULL(1) -inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) +inline nlohmann::json::json_pointer operator""_json_pointer(const char* s, std::size_t n) { return nlohmann::json::json_pointer(std::string(s, n)); } @@ -24383,8 +24383,8 @@ inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC } // namespace std #if JSON_USE_GLOBAL_UDLS - using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) - using nlohmann::literals::json_literals::operator "" _json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers) + using nlohmann::literals::json_literals::operator""_json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) + using nlohmann::literals::json_literals::operator""_json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers) #endif // #include diff --git a/Source Code/util/source/DirectPKGInstaller.cpp b/Source Code/util/source/DirectPKGInstaller.cpp index 3be2d79..a3e9afc 100644 --- a/Source Code/util/source/DirectPKGInstaller.cpp +++ b/Source Code/util/source/DirectPKGInstaller.cpp @@ -972,7 +972,8 @@ static enum MHD_Result dpiv2_on_request(void *cls, struct MHD_Connection *conn, } arg1.uri = temp_path; - arg1.content_name = req->orig_filename ? std::string("etaHEN DPIv2 | " + std::string(req->orig_filename)).c_str() : "etaHEN DPIv2"; + std::string tempstr = std::string("etaHEN DPIv2 | " + std::string(req->orig_filename)); + arg1.content_name = req->orig_filename ? tempstr.c_str() : "etaHEN DPIv2"; const char *display_filename = req->orig_filename ? req->orig_filename : temp_path;