Mike Hommey

Results 228 comments of Mike Hommey

It turns out the PBZX format doesn't look quite like what the linked code made it out to be. I have a fresh python implementation that seems to work better...

> All attributes must be on the form #[derivative(…)] There is no requirement from `#[proc_macro_derive]` that attributes must be of one form with a specific keyword related to the `#[derive]`....

The problem is that the source code uses the _DYNAMIC symbol, which translates to the binary code accessing the .dynamic section at a fixed address. But patchelf moves it, and...

Smaller (independent) reproducer: ``` #include #include extern Elf64_Dyn _DYNAMIC[]; int main() { for (Elf64_Dyn* dyn = _DYNAMIC; dyn->d_tag != DT_NULL; dyn++) { printf("%lx %p\n", dyn->d_tag, dyn->d_un.d_ptr); } return 0; }...

The symbol is not used in Firefox's case. It uses the address directly.

Actually, even in the small reproducer, the symbol is not used at runtime.

Actually, removing https://github.com/NixOS/patchelf/blob/master/src/patchelf.cc#L674 makes it work, because patchelf doesn't actually put another section where .dynamic used to be. It only overwrites its content with garbage.

Mmmm the code in `process/process_all-unix-style.go` says it should be the working directory...

So, the problem is that the `PWD` environment variable in the task is whatever the working directory was when the worker was started. The `pwd` command returns the right path,...

See https://stackoverflow.com/questions/42708462/why-is-it-useful-to-use-phantomdata-to-inform-the-compiler-that-a-struct-owns-a/42721125#42721125