mirror of
https://github.com/rui314/mold.git
synced 2024-09-22 02:20:51 +03:00
temporary
This commit is contained in:
parent
4f4d903b41
commit
10d23f945e
@ -3,7 +3,7 @@
|
||||
InputChunk::InputChunk(ObjectFile *file, const ElfShdr &shdr,
|
||||
std::string_view name)
|
||||
: file(file), shdr(shdr), name(name),
|
||||
output_section(OutputSection::get_instance(name, shdr.sh_flags, shdr.sh_type)) {}
|
||||
output_section(OutputSection::get_instance(name, shdr.sh_type, shdr.sh_flags)) {}
|
||||
|
||||
static int get_rel_size(u32 r_type) {
|
||||
switch (r_type) {
|
||||
@ -308,8 +308,8 @@ void InputSection::report_undefined_symbols() {
|
||||
|
||||
MergeableSection::MergeableSection(InputSection *isec, std::string_view data)
|
||||
: InputChunk(isec->file, isec->shdr, isec->name),
|
||||
parent(*MergedSection::get_instance(isec->name, isec->shdr.sh_flags,
|
||||
isec->shdr.sh_type)) {
|
||||
parent(*MergedSection::get_instance(isec->name, isec->shdr.sh_type,
|
||||
isec->shdr.sh_flags)) {
|
||||
u32 offset = 0;
|
||||
|
||||
while (!data.empty()) {
|
||||
|
4
mold.h
4
mold.h
@ -347,7 +347,7 @@ public:
|
||||
// Sections
|
||||
class OutputSection : public OutputChunk {
|
||||
public:
|
||||
static OutputSection *get_instance(std::string_view name, u64 flags, u32 type);
|
||||
static OutputSection *get_instance(std::string_view name, u32 type, u64 flags);
|
||||
|
||||
OutputSection(std::string_view name, u32 type, u64 flags)
|
||||
: OutputChunk(REGULAR) {
|
||||
@ -553,7 +553,7 @@ private:
|
||||
|
||||
class MergedSection : public OutputChunk {
|
||||
public:
|
||||
static MergedSection *get_instance(std::string_view name, u64 flags, u32 type);
|
||||
static MergedSection *get_instance(std::string_view name, u32 type, u64 flags);
|
||||
|
||||
static inline std::vector<MergedSection *> instances;
|
||||
ConcurrentMap<StringPiece> map;
|
||||
|
@ -502,7 +502,7 @@ void ObjectFile::convert_common_symbols() {
|
||||
return;
|
||||
|
||||
static OutputSection *bss =
|
||||
OutputSection::get_instance(".bss", SHF_WRITE | SHF_ALLOC, SHT_NOBITS);
|
||||
OutputSection::get_instance(".bss", SHT_NOBITS, SHF_WRITE | SHF_ALLOC);
|
||||
|
||||
for (int i = first_global; i < elf_syms.size(); i++) {
|
||||
if (!elf_syms[i].is_common())
|
||||
|
@ -367,7 +367,7 @@ static std::string_view get_output_name(std::string_view name) {
|
||||
}
|
||||
|
||||
OutputSection *
|
||||
OutputSection::get_instance(std::string_view name, u64 flags, u32 type) {
|
||||
OutputSection::get_instance(std::string_view name, u32 type, u64 flags) {
|
||||
name = get_output_name(name);
|
||||
flags = flags & ~(u64)SHF_GROUP;
|
||||
|
||||
@ -614,7 +614,7 @@ void HashSection::copy_buf() {
|
||||
}
|
||||
|
||||
MergedSection *
|
||||
MergedSection::get_instance(std::string_view name, u64 flags, u32 type) {
|
||||
MergedSection::get_instance(std::string_view name, u32 type, u64 flags) {
|
||||
name = get_output_name(name);
|
||||
flags = flags & ~(u64)SHF_MERGE & ~(u64)SHF_STRINGS;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user