From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1C1451382C5 for ; Sun, 21 Jun 2020 20:49:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 33792E08C2; Sun, 21 Jun 2020 20:49:01 +0000 (UTC) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 23B54E08C2 for ; Sun, 21 Jun 2020 20:49:00 +0000 (UTC) Received: by mail-pf1-x435.google.com with SMTP id s23so7379075pfh.7 for ; Sun, 21 Jun 2020 13:49:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=tqPH+Sxr5yitnX34RSpl/A4gNJoQkrq/lCqiJEY3XFs=; b=P8Ww7jaJ8lEptl81AGpKilfHXqOqjYXPZxplgLOmxeIK5ecJiNLIzzuTCfq6SnGmsk 6jyqEmryuJmFXQWdh6yl5rqlTS5gt3WQC/GEAycnFGo24k4WK29gZ2+FRfuNQUVouwQo hGveqBpbmTpVRxCi3DVn7fHd8d1ZV+GQYlBkM3uKIyNLD+8lMkLy7+uTGS9eV9De7IvP hV2uLa+kSVQZV4ao97O/JJQK44cHL8YBIe/v9JSZX3QFe7+W2zsDAp0xvYURkHXF87vj NOwaS/9M4PhjsfNXwOtwmubcv/lCVQYm/x9XQDbB8PbaI1HwBcThqvnSmzezl3UdM8o5 RfSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=tqPH+Sxr5yitnX34RSpl/A4gNJoQkrq/lCqiJEY3XFs=; b=liFcaT3W7X0AQo/4qXWO6MlIROBRH7eEUdIbjnjFAwZNjtLWdIXo4VhImEA8q+k9w8 tC0LtItIZVjIQOGhTL+6leblxoSXamN0ACQRFLMr3lVEnZMR+D0lCQY1quQMDewWUV3v 7TJdhgJZgro759te3FgRd3sugeaBgqZnkI9NwqQVHv2ZIpCbMPULre1DfRFmbIlbvf0d ycql5X/YngTWrz/MgGcYzouQB6l/fxbm45RS3nUwM/5yHMtQOTc6sGaQQAVqu1uRFaAT hOZVpVHxMl2QvMPCsaNrFjhpQs2pSnY1S34AOqWzz+ak1WRS2Kshdx/sxoiEiMNrIpMP Mpow== X-Gm-Message-State: AOAM530wcumghPRveOIrtFPodeFxsaQgr08KyZpZEIpEusEborc40+JP b9y83E5TKTrMGG1/KYyFxmsGgOnTqXmxX68aJdp3WR+ElLQ= X-Google-Smtp-Source: ABdhPJx01SEaIamepLc+v3KXxbz53utNrfjTC18FSXOJtbO34MTVrUqdfvx8VQyufG8e8lNQeLDpbFntQRQixW+01Ds= X-Received: by 2002:aa7:9a5d:: with SMTP id x29mr16776412pfj.65.1592772539828; Sun, 21 Jun 2020 13:48:59 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-soc@lists.gentoo.org Reply-to: gentoo-soc@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 From: Ahmed Soliman Date: Sun, 21 Jun 2020 22:48:18 +0200 Message-ID: Subject: [gentoo-soc] Weekly Progress: Porting relibc to gentoo To: gentoo-soc@lists.gentoo.org Cc: Luca Barbato Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: b2eb3423-28eb-4920-be1f-7a5e02d23453 X-Archives-Hash: 13abb286a996719ca2ff897d895c402d So for this week I worked on two patch sets (still trying to get gcc to link against relibc). While compiling Gcc using relibc, there was a stage where xgcc is generated and linked against relibc and used to compile the rest of the compiler. But the issue was that I was using the debug version of relibc which is significantly slower than the release version. When I tried switching to the release version, ld.so crashed in a very early stage. The issue was that Relibc had some assembly code (that broke ABI compatibility) when compiled in the release build. This patch[1] fixes this issue by trying to replace the assembly code by pure rust. Catching this bug was extremely complex because back then I didn't have debug symbols to help me figure where is the bug I only had to use prints for debugging and reading through the generated assembly I have also worked on porting elf.h to relibc as it was needed by gcc but not implemented yet in relibc, also gcc needed the posix defined file locking mechanism which wasn't implemented either in relibc. Both are implemented in this patch[2]. Thanks, Ahmed. [1] https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/282 [2] https://gitlab.redox-os.org/redox-os/relibc/-/merge_requests/283