!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

213 Members
NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux 66 Servers

Load older messages


SenderMessageTime
23 Nov 2025
@dramforever:matrix.orgdramforeverdo you mean a go program?20:22:38
@rosscomputerguy:matrix.orgTristan RossGCC & patchelf in the bootstrap-tools20:25:30
@rosscomputerguy:matrix.orgTristan RossBut the go error is preventing me from building for the system lol20:25:49
@dramforever:matrix.orgdramforeverwasn't that a non-pie problem?20:26:38
@rosscomputerguy:matrix.orgTristan RossGCC has a PIE address but the flag in the ELF header isn't set20:26:58
@rosscomputerguy:matrix.orgTristan Ross So vm.mmap_min_addr is higher than the PHDR address 20:27:09
@rosscomputerguy:matrix.orgTristan RossWhich causes the kernel to fail the mmap of the PHDR20:27:21
@rosscomputerguy:matrix.orgTristan RossPatchelf was fixed at some point and that one fixes itself after updating the bootstrap-tools but GCC is still broken20:28:06
@dramforever:matrix.orgdramforeverno no no a normal PIE would start at address 020:29:05
@dramforever:matrix.orgdramforeverthat one has file type ET_EXEC20:29:16
@dramforever:matrix.orgdramforeverpies have ET_DYN but also DF_1_PIE20:29:34
@rosscomputerguy:matrix.orgTristan Ross The PHDR starts at 0xf000 but the vm.mmap_min_addr is 65535 20:29:38
@dramforever:matrix.orgdramforeverwhy do you think it's a pie20:29:58
@rosscomputerguy:matrix.orgTristan RossBecause I thought that's what you mentioned it was when we were looking at this problem a couple weeks ago20:30:32
@dramforever:matrix.orgdramforever i said it's not a pie 20:30:45
@rosscomputerguy:matrix.orgTristan RossHuh20:30:59
@rosscomputerguy:matrix.orgTristan Ross So why else would mmap fail with 0xf000 when vm.mmap_min_addr is 65535? 20:31:29
@rosscomputerguy:matrix.orgTristan Rossmmap return EPERM20:31:49
@dramforever:matrix.orgdramforeverbecause it's not a pie20:31:50
@dramforever:matrix.orgdramforeverthat's why it fails20:31:54
@rosscomputerguy:matrix.orgTristan RossWhat?20:32:00
@dramforever:matrix.orgdramforever it fails because it's not position independent 20:32:06
@rosscomputerguy:matrix.orgTristan RossI thought you just said it's not a PIE problem20:32:06
@dramforever:matrix.orgdramforeverit's a problem because it's a PDE20:32:24
@rosscomputerguy:matrix.orgTristan RossYes, so it's the problem I was explaining. The executable should be a PIE but the kernel thinks its not.20:32:49
@dramforever:matrix.orgdramforeverthe executable has no signs of being a PIE20:33:04
@dramforever:matrix.orgdramforeverit has type ET_EXEC, first segment doesn't start at address 020:33:41
@rosscomputerguy:matrix.orgTristan RossYeah20:33:56
@rosscomputerguy:matrix.orgTristan RossAnd the good binaries have a different address for the PHDR20:34:08
@dramforever:matrix.orgdramforeverso why "should" it be a PIE?20:34:10

Show newer messages


Back to Room ListRoom Version: 10