From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) by sourceware.org (Postfix) with ESMTPS id 823673858D37 for ; Fri, 3 Mar 2023 19:35:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 823673858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-53cb9ac9470so60861477b3.10 for ; Fri, 03 Mar 2023 11:35:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677872138; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wBF6h7AaNOxDB5+W/tqBuxRaH+gSoZac+Grkha0pcP8=; b=fKUQ5x946HC9Xn80+ukwnLbhX29xeJ8xll/Ag2N9/G6MNemJlbtwmDV1d9ZQVQ1aj9 STHvgZNVYHc06J3j99UHlXk3rBQrfE+CRuPGSuy/dbAEtkYz2zmkOGyNKeQkfAw1pmAx XStnbPlsMmZ65kR2OnUNsXOQH1NDig21QdO6QahwRcFNr2IqAsW/qgJmg/u6aZH5CMI/ vnm+w9OQEyoyhTqEc+zsRmzFWvAuql4OEe5LUoMlx9Xyu6QLnV8qdJGnQPDeaHbkMbaj OAqLYbRmH2L7BTg7aBOTrAhWQQ0jHUG5MfX4CMMvhuwtUsViJtOsyMaqzwsBins/s4kq bkEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677872138; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wBF6h7AaNOxDB5+W/tqBuxRaH+gSoZac+Grkha0pcP8=; b=zDLK+0YTUQjcpmY42FAG8/l8UlUb3qDhNMRqk/1wc3k4hpQpP7XNQOcDTlkuvL7nYj Lry0+ZgWY8DlYkvATKunZYzHJjRdwYE0GxNxu+uSdEyn/StJUCd98i0ixcKrypQ52uKL hxZNxxC/iQJpEhHu78+mTEL51B9Rh4EW/FeXSjVYz2ZxIEBuTMVc9ksob0dXMeeIDAsu MN69x0IE4tAcv2Wk2OqhnNcsuRQFweHTf3lNS8YCQD5sXmCwxubDpWUuxXCBVOvQoF6f KMWj4KauH5poqdZoLwiZtYXXC3mEDSTultzGJ36lVeCTpgdDo+fYMTr/exSJjKuywVG7 sXEg== X-Gm-Message-State: AO0yUKWeng2q+OCVLp/zhn9OV1n/aCXxunLesUqA+ygfMosGXJS0a2VG CT8YxN2TFgbq1o/25O55efL4is8YoXrd85ULuTE4Z3zMbVg= X-Google-Smtp-Source: AK7set91o9PieQJMt51HjnQOGhN6yfFTX61i7dfBzkotunuhSxTg4E4BHkGKbHJ0c0mUK3D3DXKdK7/CWEoLyZyCnCs= X-Received: by 2002:a81:4521:0:b0:53c:70a4:bca2 with SMTP id s33-20020a814521000000b0053c70a4bca2mr1703909ywa.6.1677872137754; Fri, 03 Mar 2023 11:35:37 -0800 (PST) MIME-Version: 1.0 References: <498d23ca-06ce-65c5-a9ca-8ebd0240c597@eagercon.com> In-Reply-To: <498d23ca-06ce-65c5-a9ca-8ebd0240c597@eagercon.com> From: Vincent Fazio Date: Fri, 3 Mar 2023 13:35:26 -0600 Message-ID: Subject: Re: MicroBlaze symver attribute support To: Michael Eager Cc: joel@rtems.org, gcc@gcc.gnu.org Content-Type: multipart/alternative; boundary="000000000000bfdc3805f6040cca" X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000bfdc3805f6040cca Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable All On Mon, Feb 20, 2023 at 7:35=E2=80=AFPM Michael Eager = wrote: > On 2/20/23 06:54, Joel Sherrill wrote: > > > > > > On Mon, Feb 20, 2023 at 7:56 AM Vincent Fazio via Gcc > > wrote: > > > > Michael, all, > > > > Regarding: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101766 > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102110 > > > > > > If I understand correctly, since the GCC MicroBlaze targets generate > ELF > > images, it would seem there's no technical reason why `__attribute__ > > ((symver ...))` cannot be supported? > > > > The issue seems to be that the MicroBlaze targets in config.gcc do > not > > include elfos.h > > https://github.com/gcc-mirror/gcc/blob/master/gcc/config.gcc#L2369 > > > > > > Which defines `ASM_OUTPUT_SYMVER_DIRECTIVE` > > > https://github.com/gcc-mirror/gcc/blob/master/gcc/config/elfos.h#L259 < > https://github.com/gcc-mirror/gcc/blob/master/gcc/config/elfos.h#L259> > > > > Which is necessary for > > https://github.com/gcc-mirror/gcc/blob/master/gcc/varasm.cc#L6260 > > > > > > Changing the targets to include elfos.h leads to a number of > > conflicts with > > the target specific header (config/microblaze/microblaze.h). > > > > Should `ASM_OUTPUT_SYMVER_DIRECTIVE` be copied into > > config/microblaze/microblaze.h or should the MicroBlaze targets and > > header > > be reworked to support elfos.h? > > > > > > IMO reworked to include elfos.h. During the RTEMS port, we noticed that > > some quirks on the microblaze gcc because it isn't using elfos.h. This > > likely > > will mean it will be updated as a side-effect of normal GCC maintenance > > instead of being an odd singleton which doesn't share. > > > > > > I'm asking because I've seen a number of projects run into this > > issue (xz, > > elfutils, libfuse, libkcapi, cryptsetup). > > > > > > And RTEMS. > > > > --joel > > > Joel -- do you have a patch to add elfos.h to MicroBlaze? > > I have a very crude commit here off of 11.3.0: https://github.com/vfazio/gcc/commit/e65fea47b881b136f6753001791ebf68a4874d= d6 I've tested it as a patch on Buildroot's toolchain and dropped the patch we used to hack around the previous lack of symver support for XZ. I was able to boot the resultant kernel and rootfs via qemu-system-microblaze and the symbol versions XZ expects are included based on discussions with the maintainer https://github.com/tukaani-project/xz/pull/32#issuecomment-1424531920 I doubt the work is "complete" but it's a starting point. --=20 > Michael Eager > --000000000000bfdc3805f6040cca--