From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by sourceware.org (Postfix) with ESMTPS id 9488E3858413 for ; Mon, 20 Mar 2023 17:00:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9488E3858413 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-xc36.google.com with SMTP id n3-20020a4ad403000000b0053351dadc20so2010765oos.13 for ; Mon, 20 Mar 2023 10:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679331656; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=QEKOm609biYO9J0QrrQdp+Q3GL0bJpJGJnT5/n+sIYU=; b=aMp4FVuKdAP3lDZOls12W6SJoji2GdeEM0hB2lPtX5W8HXvTWsq/Akw7gmJ+M/rYqC OLUNZ6l28kXXAIRmg4eZoRXbo4Pq1AW3BZcDNPIiSh4LmAYvZGWataufecTj/1yqfXCY Yw8gGYWaFcuzq1Xabh4pljt6uv8AtR7xmFCyK3a+DcA+ZusdeLls9W/mCzB/GW8zo/Ru 7LRgI5nxFvOmKPB1sfyDWuwUsiuTjTfQKqYuRhjUBKtrFTuutdCZcsWH/M00hbwsQ8vh SA9LDCtYPGQmZcSxIGeqeG+1e/p5+9x271AJ0FnD2wLaZ40Jaaf8dHlTM2iQPgUwbn89 zFIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679331656; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QEKOm609biYO9J0QrrQdp+Q3GL0bJpJGJnT5/n+sIYU=; b=OrqTK0Hlj9RU/xph4vPeyU9d1yR9QViAdVYJAXGtHBJx12slOEGxaO2jTtj8PZH5WP /wqaXXVZewX0EMJoizAEuXflZAtgukJ7lqfOvdjIc0f6t9t63dDdP/5f0QuCQVv6BrQh eo6vGsEL/2ckD5+SLDxaNbjOS8fwhMKWGgmMk2dvaiDSFEcu2q6t/Y1DzC2wL0+s+zbo f0m3rim0ryznsQu3k2Kz39/NMhfsamRTeg2f+SApYIheSjH4AB/zs/tuxua4jzQZ9Wbq FPuFmeW7K/FVfqWuxCXjcSeETvq3Pg24QN5BHdPKjknJZGTHOlp1EfXx5tnUNfG7HYzW fWVQ== X-Gm-Message-State: AO0yUKVYws372yiMQWoms9Yu5BgkFB+f9g21U6l08rfYsdE32On9oG+9 eArfKTCcX+ax8wTnYWbhwJMJbYcWavblD/ciMr2ipw== X-Google-Smtp-Source: AK7set8BTm4vrahcjzpoB+EuoxWr7da8RYFpQCk/H4JNNt++xy5sJWp0FhAHOY2e+NCLLafl4dod1Q== X-Received: by 2002:a4a:ab47:0:b0:53b:50ea:a8f3 with SMTP id j7-20020a4aab47000000b0053b50eaa8f3mr64746oon.9.1679331655811; Mon, 20 Mar 2023 10:00:55 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:c260:d4b6:6c90:6159:ac3d? ([2804:1b3:a7c0:c260:d4b6:6c90:6159:ac3d]) by smtp.gmail.com with ESMTPSA id d68-20020a4a5247000000b004fd878ef510sm3996034oob.21.2023.03.20.10.00.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Mar 2023 10:00:55 -0700 (PDT) Message-ID: <6dbfce9e-31c8-f158-f13d-4f91ca40efd8@linaro.org> Date: Mon, 20 Mar 2023 14:00:52 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: compiling glibc using -fasynchronous-unwind-tables for arm Content-Language: en-US To: Abhijit Ray Chaudhury Cc: Florian Weimer , Adhemerval Zanella Netto via Libc-help References: <6c8e0fc6-9e86-6fc7-433f-cf5df16a6b03@linaro.org> <87jzzi14fx.fsf@oldenburg.str.redhat.com> <7d1b9611-13d1-65f0-9b47-0f7d01cec66c@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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: The -fasynchronous-unwind-table usually is used so backtraces works through signal handlers. Could you check if you build your toolchain with optimization flags (so libgcc is built with -O2) you can also build with -fasynchronous-unwind-table? On 17/03/23 10:37, Abhijit Ray Chaudhury wrote: > Hello Adhemerval, > > I could compile glibc with -funwind-table instead of -fasynchronous-unwind-table. I noticed glibc uses one of the flags for different files. As far as stack unwinding is concerned , what is the difference between -fasynchronous-unwind-table and  -funwind-table ? > > Thanking You, > -Abhijit > > On Thu, Mar 16, 2023 at 4:29 PM Abhijit Ray Chaudhury > wrote: > > Hi, > > I think the problem lies with the precedence of seemingly conflicting CFLAGS "-fasynchronous-unwind-tables -fno-unwind-tables" supplied to my cross toolchain gcc. I compiled a simple C file with " -fasynchronous-unwind-tables" , it generated an undefined symbol " `__aeabi_unwind_cpp_pr0'" although compilation was successful without -static flag. Then I compiled with " -fasynchronous-unwind-tables -fno-unwind-tables", it still generated the undefined symbol " `__aeabi_unwind_cpp_pr0'". It suggests " -fno-unwind-tables" does not stop unwind information in the ELF when I have " -fasynchronous-unwind-tables" . I then compiled with " -funwind-tables -fno-unwind-table", I did not find  undefined symbol " `__aeabi_unwind_cpp_pr0'"in the generated ELF. > > So I will compile glibc with " -funwind-table" instead of " -fasynchronous-unwind-table" and let you know the result. > > Do you see any problem with this approach ? > > Thanking You, > -Abhijit > > On Thu, Mar 16, 2023 at 1:22 AM Adhemerval Zanella Netto > wrote: > > > > On 15/03/23 11:20, Florian Weimer wrote: > > * Adhemerval Zanella Netto via Libc-help: > > > >> And I have tested with both: > >> > >> CC="arm-glibc-linux-gnueabihf-gcc -fasynchronous-unwind-tables" > >> > >> and > >> > >> CC=arm-glibc-linux-gnueabihf-gcc CFLAGS="-O2 -fasynchronous-unwind-tables" > >> > >> I also tested with gcc from ubuntu22 to check if this might something > >> I haven't enabled on my toolchain (since I don't build all languages), > >> but again I did not see any issue. > > > > It probably depends on whether libgcc.a has been built with > > optimizations or not. > > Indeed this looks like https://sourceware.org/bugzilla/show_bug.cgi?id=29621 . > Does the build work if you manually adds the -fasynchronous-unwind-tables > on config.make? >