klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
matrice64 has joined #osdev
Likorn has joined #osdev
MiningMarsh has quit [Read error: Connection reset by peer]
MiningMarsh has joined #osdev
gog has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
<Griwes> A friend is pondering on a curious piece of code, and this is a place that may know the answer: https://twitter.com/nabijaczleweli/status/1531041089490231296
<bslsk05> ​twitter: <nabijaczleweli> uuh. what could /possibly/ be the reason for this mask. if it were just the bottom 24 bits then that's fine for precision limit but it has a hole in 20,21? https://pbs.twimg.com/media/FT9ZsNMWIAAMU8K.png
<bslsk05> ​[ /* ␤ * Generate a "random" hostid using the clock. These ␤ * hostids will change on each boot if the value is not ␤ * saved to a persistent /etc/hostid file. ␤ */ ␤ if (hostid == HW_INVALID_HOSTID) { ␤ hostid = tsc_read() & 0x0CFFFFF; ␤ }]
<heat> Griwes, it looks like a random mask
<heat> maybe the hole is trying to make the TSC timestamp less predictable?
<heat> it depends on the CPU of course
<heat> IMO it looks like pseudo TSC-science
<heat> generating a random number using the TSC in _userspace_ is mindnumbingly weird
<Griwes> Right. Just posting here because this is the most likely place I know that may have someone with a bit of arcane knowledge that may explain it if it's not just weird code
<heat> like
<heat> if you're using timestamps why not srand(time(NULL))
<heat> that hostid can also collide
<Griwes> Look, if I had answers to that piece of code, I wouldn't be asking
<Griwes> lol
<heat> "the Internet address for the local machine is 127.0.1.1 (most linux libcs). or 0 (musl)" huh?
<heat> I think he means that the return address of gethostid() in musl is 0
<heat> and that's because it's useless
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
<Griwes> (nab's "they")
<heat> sorry, my bad
<bslsk05> ​doc.coreboot.org: Intel Firmware Interface Table — coreboot 4.16-1224-g10a500eb32 documentation
<heat> you can do stuff before the reset vector!
lanodan has quit [Ping timeout: 240 seconds]
lanodan has joined #osdev
Likorn has joined #osdev
blockhead has quit []
<mxshift> Similar thing exists on AMD via EFS and APCB
<mxshift> With POWER, you're expected to do a bunch of things via FSI before starting the main cores
<geist> thats' becuase you're PLAYING WITH POWER
<gog> play with cats instead
Matt|home has joined #osdev
<mxshift> I've spent too many years playing with POWER
air has quit [Quit: Client killed by user]
srjek has joined #osdev
srjek|home has quit [Ping timeout: 255 seconds]
<kingoffrance> i think i saw it in an old nintendo ad for the glove perhaps. you guys dont appreciate geist genius referenec
<gog> geniust
<mxshift> was a ad campaign for the NES: https://www.youtube.com/watch?v=5kVTo2KC4eQ
<bslsk05> ​'Nintendo Now Your Playing with Power (1987)' by Retrontario (00:00:31)
* geist smiles
<mxshift> now I feel old
<sbalmos> oh geez that even further dates me. I /am/ old.
<sbalmos> I think that glove was really useful for just one or two games?
<sbalmos> but the light gun, and Duck Hunt... ohhhhhh yeaaaaahhhh. :D
<bslsk05> ​'I love the Power Glove... its so bad.' by macjoshy (00:02:25)
<bslsk05> ​'NES Power Glove Demonstration' by Thomas Mason IV (00:03:15)
<geist> i have one in the living room next to the TV. it's Bad
<geist> like, bad as in not good
<sbalmos> Gah, forgot about Super Glove Ball
<sbalmos> I think I ended up using it in a Halloween costume
<geist> some day 10 years ago or so i casually mentioned it at work, kinda like this, and the next day when i got to work there was one sitting on my keyboard
srjek|home has joined #osdev
<geist> someone was just looking for an opportunity to offload it. a monkey's paw of our time
<sbalmos> easier than trying to get rid of it in a garage sale :D
srjek has quit [Ping timeout: 255 seconds]
air has joined #osdev
Gooberpatrol66 has quit [Remote host closed the connection]
srjek has joined #osdev
dasabhi has joined #osdev
srjek|home has quit [Ping timeout: 255 seconds]
<dasabhi> hey i was wondering if any one came across this similar issue when running rsicv on qemu
<dasabhi> hello
<dasabhi> hello
dasabhi has quit [Client Quit]
<Mutabah> umm....
<moon-child> lol
dasabhi has joined #osdev
<dasabhi> hello
<moon-child> welcome back
Likorn has quit [Quit: WeeChat 3.4.1]
<dasabhi> i was wondering if any one came across this issue when running riscv code on qemu
<dasabhi> when testing xv6, i noticed some ghost instructions being executed by qemu first when using gdb
<dasabhi> some ghost instructions i didnt recognize, before the entry point of my kernel was being hit
<dasabhi> the xv6 doc mentioned there is some boot code on riscv itself
<dasabhi> wondering if qemu is just emulating that
<dasabhi> i grepped all my object files for these instructions i didnt recognize and didnt find it, so i am thinking its just qemu running these, but its still quite strange
<heat> dasabhi, right
<heat> that's normal
<heat> for a lot of machines qemu just sticks a chunk of code as ROM
<heat> that sets up some initial regs and jumps to your kernel
srjek has quit [Ping timeout: 255 seconds]
<klange> eg. "opensbi-riscv64-generic-fw_dynamic.bin"
<heat> dasabhi, similar to this right: https://github.com/qemu/qemu/blob/master/hw/riscv/boot.c#L284 ?
<bslsk05> ​github.com: qemu/boot.c at master · qemu/qemu · GitHub
<geist> right, so probably they're seeing the opensbi stuff. you can override that with `-bios none`
<geist> in which case it just drops you at instruction in in machine mode
<heat> i think the reset vector is always there
<geist> yah the cpus by definition start in machine mode, since machine mode is non optional on riscv
yewscion has joined #osdev
<AmyMalik> what is even that
<heat> whats what
<AmyMalik> machine mode
<heat> it's basically a higher privilege mode for RISCV cpus, designed for firmware
<heat> you can access more stuff there and you don't have MMU protection
lanodan has quit [Ping timeout: 240 seconds]
lanodan has joined #osdev
<dasabhi> kinda like ring -1 for a hypervisor
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
<dasabhi> heat_: yeah exactly that
<dasabhi> oh oops i missed him
<heat_> i am heat, destroyer of worlds
heat_ is now known as heat
yewscion has quit [Quit: Connection closed]
<dasabhi> geist: so this is some kind of built in bios is that right?
<dasabhi> looking into the sbi, it seems like its a part of the riscv standard
<heat> no, the reset vector is not
<heat> but the sbi is kinda yes
<heat> but it actually supersedes regular firmware, you can't manually do some things sbi does for you
<dasabhi> yeah this is strange, that an ISA would ship with a set of software all the time
<heat> like touching mtimer
<heat> it doesn't ship with it
<heat> it's there as kind of a firmware/hypervisor-ish layer
<dasabhi> yeah strange, does x86 have this?
<heat> no
<dasabhi> all of this is th bootloaders responsibility in x86 land
<dasabhi> interesting that riscv did this
<heat> no, it's not
<heat> the bootloader isn't present after booting the kernel
<heat> sbi is
<heat> it's a bit like SMM maybe
<heat> but manual
<dasabhi> wow, i should def turn this off then
<Mutabah> SBI is more like uEFI's runtime services (crossed with SMM)
<dasabhi> SMM?
<Mutabah> System Management Mode
<heat> system management mode
<heat> ring -1
<heat> it can do pretty much everything
<heat> even interrupt non-interruptable ring 0 code
<heat> anyhow, don't disable sbi
<dasabhi> interesting, i will have to revist that when i port this to x86
<heat> you'll always need to have something running in machine mode
<dasabhi> does this layer get hit every time i context switch?
<heat> dasabhi, no you won't, SMM is totally transparent to the OS
<dasabhi> why is that? i was always under the impression that the OS is the lowest thing
<heat> it's an illusion :)
<heat> intel is moving away from SMM because it grew very large
<heat> but it will always be there
<heat> this is all firmware land btw
<dasabhi> interesting, you as the programmer do get to hit ring -1 if you want though right?
<dasabhi> if you want to write a type 1 hypervisor
<heat> no
<dasabhi> so ring -1 is always off limits to us in x86 land?
<heat> the only way to enter SMM is through an SMI (system management interrupt)
<heat> well, no. if you're the firmware, you get to program that
<dasabhi> i will table this for when i hop to x86, will keep the sbi in mind for now
<dasabhi> thank you guys for the info
<dasabhi> learned something completely new
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
<heat> router's great
<heat> anyway, you basically you program the chipset to reserve a bunch of space as SMRAM, system management ram, that the kernel can't access
<heat> the CPU then jumps to SMRAM + fixed offset (this is documented in the Intel SDM)
<heat> why can't the kernel reprogram the SMBASE (smram base)? because if the firmware is doing things right, it will lock the register. no writes can be done after that
<heat> if you do everything right, this basically makes a secure environment you can run ring -1 code in
<heat> you get to interrupt everything, and pretty much silently, the only way to detect it is by trying to time things
heat has quit [Remote host closed the connection]
heat has joined #osdev
<heat> AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH PAIN
<heat> anyway, lots of exploits for SMM code have been found over the years
<heat> it turns out humans make mistakes and firmware engineers are humans
yewscion has joined #osdev
<dasabhi> i have questions, but its quite late here :(
<dasabhi> if i start this convo i wont be able to sleep lol
<dasabhi> talk to you guys some time this week
<dasabhi> goodnight every one and thanks again for the info
dasabhi has quit [Quit: Lost terminal]
heat has quit [Ping timeout: 244 seconds]
Oshawott has joined #osdev
Gooberpatrol66 has joined #osdev
ThinkT510 has quit [Quit: WeeChat 3.5]
ThinkT510 has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
Likorn has joined #osdev
jafarlihi has joined #osdev
_xor has quit [Quit: brb]
the_lanetly_052_ has joined #osdev
jafarlihi has quit [Quit: WeeChat 3.5]
bauen1 has joined #osdev
the_lanetly_052 has joined #osdev
the_lanetly_052_ has quit [Ping timeout: 246 seconds]
the_lanetly_052_ has joined #osdev
the_lanetly_052 has quit [Ping timeout: 246 seconds]
Likorn has quit [Quit: WeeChat 3.4.1]
GeDaMo has joined #osdev
wootehfoot has joined #osdev
Matt|home has quit [Ping timeout: 258 seconds]
wootehfoot has quit [Ping timeout: 246 seconds]
bauen1 has quit [Ping timeout: 246 seconds]
bauen1 has joined #osdev
vimal has joined #osdev
opios2 has joined #osdev
<opios2> yoyoyo
<opios2> hows everyone here
<opios2> meowwwwwww
* kingoffrance pets opios2 and gives them coffee
zaquest has quit [Remote host closed the connection]
pretty_dumm_guy has joined #osdev
zaquest has joined #osdev
<bslsk05> ​wiki.osdev.org: Page Frame Allocation - OSDev Wiki
<opios2> The address of each available physical frame is stored in a stack-like dynamic structure. Allocating a page is fast (O(1)), freeing a page too but checking the state of a page is not practical, unless additional metadata is stored sorted by physical address.
<opios2> so instead of bitmap i can just store start and end of my frame address in a list?
<opios2> like if i want 4 page frame i just say {start:1, end:5, state:busy}
<opios2> i currently have bitmap but i think list is going to be much quicker
<zid> freelists are generally just linked lists using each page
<zid> not ranges
<mrvn> opios2: while ranges seem like a good idea memory will quickly fragment and finding a range to add a freeed page to is expensive.
<mrvn> And unless you have outdated hardware you don't really need contigous pages. So why bother with ranges?
<mrvn> I think there are only 2 real cases 2 consider: 1) you don't need any info per page other than free/not free and then stack/list is just the simplest. 2) You need per page infos and then a struct PerPage[] is required, not just a bitmap or buddy system.
<gog> opios2:
<gog> mewww
vimal has quit [Quit: Leaving]
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
<sham1> mow
<zid> maoam
<mrvn> purrrfect?
frkazoid333 has quit [Ping timeout: 272 seconds]
kspalaiologos has joined #osdev
Bonstra has quit [Ping timeout: 260 seconds]
ripmalware has quit [Ping timeout: 246 seconds]
ripmalware has joined #osdev
mavhq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Bonstra has joined #osdev
elastic_dog has quit [Ping timeout: 255 seconds]
elastic_dog has joined #osdev
elastic_dog has quit [Excess Flood]
lg has joined #osdev
elastic_dog has joined #osdev
the_lanetly_052_ has quit [Ping timeout: 246 seconds]
Burgundy has joined #osdev
hbag has joined #osdev
heat has joined #osdev
kspalaiologos has quit [Quit: Leaving]
gildasio has quit [Ping timeout: 240 seconds]
gildasio has joined #osdev
blockhead has joined #osdev
doorzan has joined #osdev
bauen1 has quit [Ping timeout: 276 seconds]
jafarlihi has joined #osdev
gildasio has quit [Ping timeout: 240 seconds]
gildasio has joined #osdev
lanodan has quit [Ping timeout: 246 seconds]
jafarlihi has quit [Quit: WeeChat 3.5]
lanodan has joined #osdev
bauen1 has joined #osdev
bauen1 has quit [Ping timeout: 258 seconds]
gildasio has quit [Ping timeout: 240 seconds]
bauen1 has joined #osdev
gildasio has joined #osdev
frkzoid has joined #osdev
pretty_dumm_guy has quit [Ping timeout: 260 seconds]
pretty_dumm_guy has joined #osdev
* vdamewood pets kitty
jafarlihi has joined #osdev
wootehfoot has joined #osdev
* gog prrs
* vdamewood gives gog a fishy
* gog chomps fishy
<jafarlihi> Am I a bad programmer if I can't make head and tails of 2 kLOC of C++20?
<gog> nah that's normal
<vdamewood> Usually, there's more than heads or tails to that.
<gog> speaking of fishy, i interviewed for coding job today. working on a command and control application for an automated fish processing system
<gog> went well, i think i'll get called back
<vdamewood> Yay!
<zid> even 10 lines of C++ is pretty hairy
<gog> they were specificlaly looking for people who can do linux, c++ and qt because they're trying to port their old-style qt to use qml and stuff instead
<vdamewood> Ohh... i can show you a few things
<zid> gog: I assume there's the fish job, the moss job and the no-trees job, so you're pretty limited in options, good job
<zid> vdamewood: pervert
<gog> yes
<vdamewood> zid: Hey, everyone tells me my things are Qt, so :P
<zid> gog: i was thinking of maybe writing some code at some point. Berate me please.
<gog> zid: i'm not into that kind of thing
<vdamewood> QObject::connec(me,&human::acquiredfish, gog, &kitty::chomp);
<zid> You're right, you use C++, I wouldn't be able to stop giggling if you tried to berate me
<vdamewood> connect*
<gog> the signal should be offeredFish
<jafarlihi> I interviewed for Node.js position and was supposed to get the decision today, refreshed Gmail million times now
<gog> zid: i don't use it, but i can
<gog> and i'm probably going to use it more just to spite you
<zid> It won't spite me
<zid> it'll just make me think you have home issues
<zid> unloving parents etc
<vdamewood> C++ is a fine language... well actually it's 3 fine languages in a trenchcoat... well actually it's 3 fine languages in a trenchcoat shoved into a blender.
<gog> i mean i do so you're not wrong
<zid> Did I mention I'm never wrong
<gog> many times
<vdamewood> zid: Butyou were wrong when you said it.
<zid> vdamewood: it's a meta-language-language for writing meta-languages in, that's why it looks like three languages
* vdamewood shoves zid into the blender.
<gog> and qt is meta-meta-language-language
<vdamewood> Who wants a sloppy Jimbo?
<zid> oh god, does Qt generate C++ now?
<vdamewood> moc does
<gog> moc generates c++
* vdamewood pets gog
<gog> and it's totally incomprehensible
<clever> zid: i think it always generated c++
<gog> but it works
<vdamewood> uic also generates C++
<gog> yes
<vdamewood> So, Qt has two tools that generate C++.
<zid> I thought it was a damn windowing toolkit
<gog> it's also that
<gog> but it's implemented on top of a meta-meta-language-language
<vdamewood> zid; It has that, too.
<zid> This is the problem with C++ projects, it's hard to tell where the project ends and the language starts
<gog> it's projects all the way down
<clever> zid: i think uic just translates your xml gui definition, into c++ code that spawns instances of every gui element
<zid> because half of the stuff will be the meta-language the meta-meta-language described, which is then used to write the program
<clever> the same way you could have built the gui in c++ by hand
<vdamewood> zid: FWIW, Qt up to Qt 4 was a windowing toolkit with some extra features. With Qt5 they separated the windowing stuff into is own module, and now it's a collection of generally useful tools.
<zid> I don't believe the latter part
<clever> i use QT signaling in my thermostat software
<gog> it's got kitchen sing too
<gog> sink*
<vdamewood> For example, Qt has an sQL module, and OS-agnostic abstractions for file access, and such.
<clever> each class has a bunch of signals and slots, and connect() routes the data around
<vdamewood> Oh, and networking.
<gog> i do think it's nice that they use more of the STL now instead of their own templates
<gog> container templates*
<clever> QT can also compile to native code on both ios and android
<clever> the only problem i ran into there, is that the QT network layer, returns different error codes on ios, when a self-signed cert comes up
<gog> but Qt was created in an era where you couldn't rely on the STL being available or not broken
<vdamewood> gog: Yeah, it's really nice that they've updated to modern C++.
<zid> Now you can rely on the STL being broken! yay!
<gog> only on windows tbh
<vdamewood> Even on Windows it works fairly well.
<gog> yes
<vdamewood> But yeah, these days we have three very nice implementations of the C++ stndard library.
<zid> iostream is broken by design dw
<zid> it can be perpetually broken
<zid> don't need to worry about anyone making it functional
<gog> i mean, i'm not keen on the overloading of operator<<
<gog> i actually don't like that
<gog> sort of the same with how string substitution in python was overloaded on __mod__
<gog> the new way is better
<vdamewood> Now if only we could get stable ABIs for C++.
<gog> yes
<vdamewood> I should check my Qt installation on Windows.
<vdamewood> Oh, Maybe I could write an OS kernel with Qt!
<vdamewood> Oh, looks like I need to update.
gildasio has quit [Remote host closed the connection]
doorzan has quit [Quit: Leaving]
<gog> qt kernel would be a neat trick
<gog> load drivers as plugins
<gog> you'd need a lot of glue code underneath it though
<gog> enough to qualify alone as a complete OS
<vdamewood> But imagine if drivers could use signals and slots!
<zid> I was informed it was generically useful
<mrvn> vdamewood: my drivers use IPC
<heat> gog, you ditched gsoc?
<gog> yeah i couldn't make it work
<heat> :|
<heat> oh well
<gog> they wanted 350 hours between june and september
<gog> that'd be about 3 .5 hours every day
<heat> from experience that's not really accurate but yeah
<gog> i'm working between 8-10 hours a day already
<heat> couldn't you have done a medium sized project?
<gog> there's no way i'd have been able to commit to that
<gog> i didn't apply for any others unfortunately, i didn't anticipate finding a job so soon
<heat> i did my gsoc mostly in 8 hour binges spread apart
<zid> 43 of them? :p
<heat> :D
<gog> if i don't get a coding job by next year i'll apply again and maybe take vacation if i'm still at the same place
<heat> nah my project was around 175 hrs, medium sized, they only had that size last year
<heat> also I took a good bit less than that because I was totally self sufficient and I'm not strange to writing low level code, having written a whole operating system before
<heat> gog, do you have a degree?
<gog> no
<gog> i'm a few credits short
<gog> a couple semesters' worth actually
<heat> yeah that might be a good idea
<heat> you should try cloudflare
<heat> no bias here
<heat> :)
gildasio has joined #osdev
<gog> cloudflare?
<heat> yea
<zid> they do nice blog posts
<gog> hm
<heat> good options may also be canonical or red hat
<heat> those frequently have full remote positions
<gog> we'll see how this next one shakes out. my current job is stable and my boss had a bit of a crisis when i told him i was interviewing for another job
<heat> boss be like 😭😭😭😭
<gog> yeah he's not keen on replacing me so that's good news i guess :p
<zid> Make sure the raise you get for staying gets 10% added to it for this year's inflation :P
<gog> if i get an offer at the other place he won't be able to afford it tbh lol
<heat> damn right
<heat> know your worth
<heat> go get 'em girl
<gog> i'm already well above the median for my position in my union
<zid> oh a union, I forgot places had labor laws sometimes
<zid> so used to talking to merkins
<gog> the median for software developers is about 50% more than my current salary
dude12312414 has joined #osdev
Likorn has joined #osdev
sonny has joined #osdev
<jafarlihi> I was supposed to get rejection/offer today but HR asked for another "short" meeting tomorrow, do you think I'm in?
<zid> checking you weren't the one who left a mess in the bathroom
<heat> :D
sonny has quit [Quit: Ping timeout (120 seconds)]
floss-jas has quit [Remote host closed the connection]
sonny has joined #osdev
<gog> jafarlihi: sounds promising
<gog> best guess is that they're gonna give you an offer but they're not so confident you'll accept it
<gog> so they want you in person to see how you react
sympt7 has joined #osdev
sympt has quit [Ping timeout: 258 seconds]
sympt7 is now known as sympt
<jafarlihi> Do you know of any OS projects where author uses self-made build system?
<psykose> windows
sonny has quit [Ping timeout: 252 seconds]
yewscion has quit [Killed (mercury.libera.chat (Nickname regained by services))]
Guest7325 has joined #osdev
<klys> jafarlihi, pretty much any free project uses a free build system. that separates the two projects right there.
jafarlihi has quit [Quit: WeeChat 3.5]
<klys> build systems I've heard of include: gnu make, bsd make, nmake, cmake, ninja/jiri, ...
sonny has joined #osdev
sonny has left #osdev [#osdev]
<mrvn> oasis, dune,
* vdamewood pets his build system
jafarlihi has joined #osdev
jafarlihi has quit [Client Quit]
wootehfoot has quit [Ping timeout: 240 seconds]
jafarlihi has joined #osdev
jafarlihi has quit [Quit: WeeChat 3.5]
<heat> managarm has a self made build system I think
mahmutov has joined #osdev
lanodan has quit [Ping timeout: 255 seconds]
lanodan has joined #osdev
heat has quit [Ping timeout: 252 seconds]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
vdamewood has quit [Quit: Life beckons]
vdamewood has joined #osdev
mavhq has joined #osdev
floss-jas has joined #osdev
matrice64 has quit [Quit: Textual IRC Client: www.textualapp.com]
pretty_dumm_guy has quit [Ping timeout: 272 seconds]
GeDaMo has quit [Quit: There is as yet insufficient data for a meaningful answer.]
Vercas has quit [Quit: Ping timeout (120 seconds)]
Vercas has joined #osdev
pretty_dumm_guy has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
moatx has joined #osdev
dude12312414 has quit [Remote host closed the connection]
moatx has quit [Quit: Leaving]
heat has joined #osdev
bgs has quit [Remote host closed the connection]
bgs has joined #osdev
Likorn has joined #osdev
wxwisiasdf has joined #osdev
<wxwisiasdf> how do i tell LD to discard the GOT section
<wxwisiasdf> forcefully, i am using -static, i don't want the got
<zid> don't use PIE
<zid> and your compiler won't spit one out
<wxwisiasdf> -fno-pie? okay
<mrvn> if you have a GOT then something is using it. XY problem.
<mrvn> no PIC either
<wxwisiasdf> it still produc-
<wxwisiasdf> ah
<wxwisiasdf> it still produces it
mahmutov has quit [Ping timeout: 246 seconds]
<wxwisiasdf> i passed -fno-pie to ld, and -fno-pic to gcc
<zid> do what I said, pass -fno-pie to gcc
<mrvn> and no -fpic or -fpie?
<zid> when building the .o files
<wxwisiasdf> nope
<wxwisiasdf> still i passed -fno-pic and -fno-PIE to gcc and ld and no avail
<zid> so readelf -e shows .got?
<wxwisiasdf> yes
<zid> on the .o file? I didn't know it did that even with fPIE :p
<wxwisiasdf> ok gimme a sec to check the o files
<zid> -no-pie is also a thing, I forget if the options do different things or not
<wxwisiasdf> there is .rela.text but no .got on the .o files
<zid> yea those are the somewhat expected text relocations (call blah)
<wxwisiasdf> i deleted the entire build directory and still, the final .elf has
<zid> if you're not using PIE you can *maybe* safely delete the got.. but I don't think you should have one at all if gcc didn't make a pie object file and ld was told not to produce one..
<wxwisiasdf> if i try to move the got outside of rodata/data it crashes ld
vdamewood has quit [Read error: Connection reset by peer]
<wxwisiasdf> i just need the got to be page aligned, or preferably to not exist
<zid> you can discard it
<zid> if it's definitely not needed
vdamewood has joined #osdev
<zid> but the fact it spat one out says to me it thinks it is
<wxwisiasdf> it's def not needed, whats the synt-
<zid> same as it always was
<zid> /DISCARD/ as the section name
<mrvn> there is an option to garbage collect
<zid> consume the got via it
<wxwisiasdf> okay
<wxwisiasdf> it segfaults the linker
<zid> is this a strange platform nobody ever uses
<wxwisiasdf> yes
<zid> found your problem then :P
<wxwisiasdf> :/
<zid> update binutils?
<wxwisiasdf> binutils is in trunks
<wxwisiasdf> bleeding edge
<zid> complain to the ML then I guess
<zid> you have a crash to report at least
<wxwisiasdf> but i can work around it, right?
<wxwisiasdf> there must be another way...
<zid> not if it's spitting one out and it's ignoring the option to disable it
<zid> and discarding it is breaking it
<mrvn> just ignore it, can't be that bg
<mrvn> big
<zid> you could *maybe* do surgery with sstrip?
<zid> sounds like the backend for whatever arch this is is just immature af
<wxwisiasdf> is the GOT pointer generated if some dependency happens to use -fPIC?
<zid> and doesn't support all the frontend options etc
<zid> probably
<wxwisiasdf> :)
<wxwisiasdf> time to rebuild everything with -fno-pic then
<mrvn> dp you link any libs? libgcc.so?
<wxwisiasdf> i link a custom libc and 3 other libs
<heat> wxwisiasdf, binutils and gcc trunk aren't stable
<mrvn> doh
<wxwisiasdf> libgcc not used because it dies
<mrvn> rebuild everything as static then. stupid but if you insist on no GOT ...
<zid> I am also unstable
* zid murders a stuffed animal and shouts at traffic
xenos1984 has quit [Quit: Leaving.]
<psykose> curious what the platform is
<zid> RISC-VI
<psykose> risc-iv
<wxwisiasdf> big brain ideas require big brain gcc compilation times
<mrvn> LTO all libs
<j`ey> wasnt it some IBM thing?
<zid> my kernel takes over a second to build, maybe I should stop deleting the 300kB .o file that contains the bootsplash image :p
<mrvn> why delete anything at all? set the prerequisites correctly and just "make"
<wxwisiasdf> my kernel takes like 10 seconds
<wxwisiasdf> mrvn: true
<wxwisiasdf> oh my god
<mrvn> A while back I included a cos/sin table pre-computed at compile time. That took a bit longer to build.
<wxwisiasdf> it got worse
<wxwisiasdf> now there are like 10 gots
<zid> Perfect
<zid> Making it worse is the first step to making it better, everybody knows that
<wxwisiasdf> :)
<zid> as long as you don't stop breathing at some point
<mrvn> in with the good code, out with the compiler errors
<mrvn> I mean air
<wxwisiasdf> oh finally it's now gone :D
xenos1984 has joined #osdev
<zid> seeee
<zid> That'll be $400 consultation fee
<psykose> got rid of the Grand Old Time :(
Gooberpatrol66 has quit [Remote host closed the connection]
Burgundy has quit [Ping timeout: 256 seconds]
bgs has quit [Remote host closed the connection]
<zid> I can never remember how to set my damn network up for qemu
bgs has joined #osdev
<zid> It's working but it shouldn't be! tap0 is returning pings but my OS has interrupts disabled and isn't printing "pong" to its console
<wxwisiasdf> luckily you have a relatively documented specifciation for how to use networking in qemu :^)
<zid> It's working TOO GOOD though
<wxwisiasdf> and don't rely on a website from mid 2000's to give you information in plain html
<wxwisiasdf> zid: maybe some automatic thing
<wxwisiasdf> or probably something is seeding the tap0
<wxwisiasdf> outside of qemu ofc
wxwisiasdf has quit [Quit: Lost terminal]
<klange> $ time make -j16 → real 0m37.598s, user 0m59.727s, sys 0m17.919s
<klange> couple of standout slow parts - interpreter, editor, final ramdisk build
<mrvn> start them first
* zid gives up and chases squirrels
<bslsk05> ​'Backyard Squirrel Maze 1.0- Ninja Warrior Course' by Mark Rober (00:20:20)
<klange> I build the editor as a single file, linked with a shared object for the interpreter (provides configs, syntax highlighting - dunno how extenisvely I've talked about bim+kuroko's combo architecture here)
<klange> I also build Kuroko in one go - basically cc kuroko/src/*.c - both for the main interpreter (which is static wrt itself) and for the shared object version
<klange> could parallelize kuroko better with a normal "many .o's" build
<klange> but I also don't really care, a minute to build a whole graphical OS is fine by me
<mrvn> build time after you changed a single file is more important anyway.
<klange> and as much as I've been doing lots of `make clean` builds recently as I keep breaking Kuroko's ABI (it's okay, there's a version bump happening, and it's all for performance™ reasons)
<mrvn> do you use ccache?
<heat> if you ever switch build systems you have the meson build patch I gave you :)
<klange> most builds are single file changes that are pretty fast, though the ramdisk is still a bottleneck
<klange> heat: I will probably include that in kuroko as an option as this 1.3 (or maybe 2.0 - so much has happened, it might even warrant the major version bump, and I use a shifted form of semver where the minor version is for ABI breaks, so the major version is for complete redesigns)
<klange> ... as this 1.3 (...) release gets finalized
<klange> forgot where I was going with that sentence in the middle of the parenthesized subclause
<heat> yay one less patch I need to maintain