#
✕ nick:yrlf
#asahi-dev · 2022-04-01 10:18
yrlfkode54: "Pwned by the owner" by Zoz?
#asahi-dev · 2022-03-16 13:20
yrlfjannau: I didn't even know a pkgrel of 2.1 was possible o.O
#asahi-dev · 2022-03-16 13:18
yrlfj`ey: one of the most important ones :D
#asahi-dev · 2022-03-16 13:16
yrlfmarcan: you had a typo in the first paragraph ("deal time" instead of "real time")
#asahi-dev · 2021-05-29 16:25
yrlfmarcan: well that's a way to "fix" this, but it does work for now ^^
#asahi-dev · 2021-05-29 16:25
yrlffrom a quick git blame it seems the function was introduced in v3.5
#asahi-dev · 2021-05-29 16:21
yrlfVinDuv: they don't seem to have a function named "_reset_input_buffer"; maybe it's been factored out at some point
#asahi-dev · 2021-05-29 16:20
yrlfat least it wasn't your password
#asahi-dev · 2021-05-29 16:20
yrlfthe classic incorrect focus oops
#asahi-dev · 2021-05-29 16:19
yrlfif I remember correctly this happened quite a few times already
#asahi-dev · 2021-05-29 16:19
yrlfat this point we could even add a "if not hasattr(serial.Serial, "_reset_input_buffer"): print("check your pyserial version")
#asahi-dev · 2021-05-15 08:40
yrlfmarcan: "macOS ; compatible, Linux 5.13" :^)
#asahi-dev · 2021-02-17 16:37
yrlf(IANAL, of course)
#asahi-dev · 2021-02-17 16:37
yrlfmodwizcode: sure, but as I understand it, a public fork of a GPL project most likely counts as distribution, so adding decompiler output _anywhere_ in that repo is questionable at best from a copyright perspective
#asahi-dev · 2021-01-21 19:22
yrlfyeah, would have used something like that :)
#asahi-dev · 2021-01-21 19:20
yrlfsven: or, if we want to stay topical: #error "GOT YOU MORON"
#asahi-dev · 2021-01-21 19:19
yrlfokay, so assume LP64 and bail if not, got it
#asahi-dev · 2021-01-21 19:14
yrlfis there any other compiler where the defaults might differ that we should support?
#asahi-dev · 2021-01-21 19:13
yrlfaarch64-linux-gnu-gcc has -mabi=lp64 as a default anyway, and clang doesn't have the option (and from the codegen it seems lp64 is the default as well)
#asahi-dev · 2021-01-21 19:13
yrlfhas anyone looked into what to do about the -mabi option?
#asahi-dev · 2021-01-21 19:06
yrlfso then all that's left is cleaning up the clang branch
#asahi-dev · 2021-01-21 19:05
yrlfoh, okay then. GCC+Clang makes it even simpler to support then.
#asahi-dev · 2021-01-21 19:04
yrlfhaving it work on GCC, Clang, and AppleClang out of the box, with no requirements on particularly recent versions should be the goal IMO
#asahi-dev · 2021-01-21 19:04
yrlfbut I think the focus for us shouldn't be "as performant as possible", but mostly "which options are most likely to work on as many compilers / linkers as possible".
#asahi-dev · 2021-01-21 19:03
yrlfwith the right codegen options, the compiler can optimize better though, since all symbols are gonna be dso-local, so a GOT isn't needed (except for if the binary is too large for relative references)
#asahi-dev · 2021-01-21 19:01
yrlffor us it's not gonna be a big difference anyway. m1n1 doesn't link any libraries, all of the external code is right there in-tree, so -shared vs -static doesn't make a lot of difference, and with -pie they both produce ET_DYN ELFs
#asahi-dev · 2021-01-21 18:40
yrlfyeah, static-pie was added in 8
#asahi-dev · 2021-01-21 18:39
yrlfwhat version do you have?
#asahi-dev · 2021-01-21 18:35
yrlfwhat does yours do in that case? -static-pie on my GCC produces the linker options `-static -pie --no-dynamic-linker -t text`
#asahi-dev · 2021-01-21 18:34
yrlfso 'file' will still say it's a shared object
#asahi-dev · 2021-01-21 18:33
yrlfthe difference is not a lot though, both produce a ET_DYN executable, since PIE is a complete hack
#asahi-dev · 2021-01-21 18:33
yrlfIMO -shared makes little sense here anyway (since we aren't loaded by anyone). we probably want -static -pie here
#asahi-dev · 2021-01-21 18:24
yrlf*?
#asahi-dev · 2021-01-21 18:24
yrlfmodwizcode: which options are you talking exactly? the codegen options (-mabi in particular)
#asahi-dev · 2021-01-21 14:05
yrlfyeah, my own dynamic loader also does that
#asahi-dev · 2021-01-20 23:43
yrlfwait, that's effectively what `apply_rela` is
#asahi-dev · 2021-01-20 23:43
yrlfj`ey: sounds ugly
#asahi-dev · 2021-01-20 23:41
yrlfyeah, what -static-pie does at the linker level is usually -static -pie --no-dynamic-linker. the latter is done here by /DISCARD/ing the .interp and .dynamic sections
#asahi-dev · 2021-01-20 23:40
yrlfI was looking around trying different flags since both GCC and clang were generating relocations that I have definitely already seen GCC optimize away in my own projects
#asahi-dev · 2021-01-20 23:38
yrlfbecause that can't be done relatively, since its literally data
#asahi-dev · 2021-01-20 23:38
yrlfI think the easiest way we can force a relocation there is `int x; int * xptr = x;` globally somewhere
#asahi-dev · 2021-01-20 23:37
yrlfbecause then the compiler can generate relative accesses for everything
#asahi-dev · 2021-01-20 23:37
yrlfwell, at least for the binary sizes we have here it will always work if we have -z notext
#asahi-dev · 2021-01-20 23:36
yrlfyeah, most likely just got lucky
#asahi-dev · 2021-01-20 23:36
yrlf(the flags are -static-pie for compiling and -static -pie for linking, clang doesn't like -static-pie for compiling though)
#asahi-dev · 2021-01-20 23:35
yrlfprobably not _really_ needed, since what we have works, but I kind of want to know
#asahi-dev · 2021-01-20 23:34
yrlfhaven't found a way to do it portably (i.e. clang) yet
#asahi-dev · 2021-01-20 23:34
yrlfthe code looks good though
#asahi-dev · 2021-01-20 23:34
yrlflike, literally only NONE relocations remain
#asahi-dev · 2021-01-20 23:33
yrlfhuh, I think I have found GCC compiler flags that make it resolve ALL of the relocations at compile time

plus ›