This patch allows two things:
- Factorizing code that was in main and the open action
- Displaying the full path of non-unveiled paths
Indeed, looking for the path of a fd is not allowed if the file isn't
unveiled. By setting the title in `load_file()` we are actually relying
on the value returned by `LibFSAC` who is actually authorized to
retrieve the entire path.
It was the only function to not use the `LibFSAC`, it will allow us to:
- Not unveil some file
- Drop some tests on to-be-read-from file as they are performed in
`LibFSAC`.
As it was using the `lines()` method of `Core::DeprecatedFile`, this
patch also introduce the usage of `BufferedFile` to take advantage of
its API: `can_read_line()` and `read_line()`.
Previously, we were rewriting the on_primary_color_change in the Text
Tool and Gradient, which made the palette widget no longer update after
picking a color from an image. Additionally, it also crashed the program
after leaving the Gradient tool and trying to change color.
This commit adds the used relocation types to elf.h, and handles the
types in DynamicLoader and DynamicObject. No new functionalitty has to
be added, as the same code can be reused between aarch64 and x86_64.
This commit adds Processor::set_thread_specific_data, and this function
is used to factor out architecture specific implementation of setting
the thread specific data. This function is implemented for
aarch64 and x86_64, and the callsites are changed to use this function
instead.
The aarch64 processor is set up to trap on unaligned memory accesses, so
to enforce that the compiler correctly generates aligned accesses, the
-mstrict-align flag is needed. We also need the -Wno-cast-align as there
are some files in AK that don't build without the flag.
This commit adds R_AARCH64_RELATIVE to elf.h and uses it in
ELF::perform_relative_relocations to correctly verify the relocation
type. This is the only change needed to support relative relocations for
aarch64.
The code would access the __stack_chk_guard variable in main.cpp and
LibELF/Relocation.cpp before the loader was able to relocate itself, so
this commit disable the stack protector for the aarch64 build to make
sure that no accesses to __stack_chk_guard are inserted.
While DeprecatedString and StringView use ASCII case-insensitivity when
matching, String uses the Unicode rules, so in order to match the spec,
we need to *not* use `String::equals_ignoring_case()`.
This function needs to be used everywhere that the spec refers to
an "ASCII case-insensitive match".