public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Nathan_Lynch@mentor•com (Nathan Lynch)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v6 0/6] ARM: vdso gettimeofday using generic timer architecture
Date: Thu, 24 Apr 2014 10:15:15 -0500	[thread overview]
Message-ID: <53592A83.2040401@mentor.com> (raw)
In-Reply-To: <CAKv+Gu-jFAo8JKqz3XHx348pSUBWaDy48RryKwgsxdM15jeAVw@mail.gmail.com>

On 04/24/2014 02:37 AM, Ard Biesheuvel wrote:
> On 23 April 2014 23:50, Russell King - ARM Linux <linux@arm•linux.org.uk> wrote:
>> On Tue, Apr 22, 2014 at 07:48:51PM -0500, Nathan Lynch wrote:
>>> - Build vdso.so with -lgcc: calls to __lshrdi3, __divsi3 sometimes
>>>   emitted (especially with -Os).  Override certain libgcc functions to
>>>   prevent undefined symbols.
> 
> After reading Russell's concerns below, I had a quick play with these
> patches, and I noticed that the libgcc dependencies are actually only
> present when compiling -Os. However, with normal optimization enabled
> (which most people are using anyway), you don't need libgcc at all. So
> why not override -O2 optimization for vdso.so, and be done with it?
> 
> WIth -Os:
> 
> Archive member included because of file (symbol)
> 
> /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/sf/libgcc.a(_divsi3.o)
>                               arch/arm/kernel/vdso/vgettimeofday.o
> (__aeabi_idiv)
> /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/sf/libgcc.a(_lshrdi3.o)
>                               arch/arm/kernel/vdso/vgettimeofday.o
> (__aeabi_llsr)
> 
> Without CONFIG_OPTIMIZE_FOR_SIZE, no archive members are included at all.

Thanks.  I had thought about forcing -O2 in the past but just wasn't
confident that it would prevent calls to __divsi3 etc in all situations.
 I mean, that's not really a documented or guaranteed behavior of -O2,
is it?

I've now built vdso.so with your suggested change with GCC 4.[4-8]
without getting any unresolved symbols, so here's hoping this is a
viable option.

  reply	other threads:[~2014-04-24 15:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-23  0:48 [PATCH v6 0/6] ARM: vdso gettimeofday using generic timer architecture Nathan Lynch
2014-04-23  0:48 ` [PATCH v6 1/6] ARM: place sigpage at a random offset above stack Nathan Lynch
2014-04-23  0:48 ` [PATCH v6 2/6] ARM: allow user access to arch timer virtual counter Nathan Lynch
2014-04-23 17:32   ` Will Deacon
2014-04-23 17:41     ` Nathan Lynch
2014-04-24 10:18       ` Will Deacon
2014-04-23  0:48 ` [PATCH v6 3/6] ARM: miscellaneous vdso infrastructure, preparation Nathan Lynch
2014-04-23  0:48 ` [PATCH v6 4/6] ARM: add vdso user-space code Nathan Lynch
2014-04-23  0:48 ` [PATCH v6 5/6] ARM: vdso initialization, mapping, and synchronization Nathan Lynch
2014-04-23  0:48 ` [PATCH v6 6/6] ARM: add CONFIG_VDSO Kconfig and Makefile bits Nathan Lynch
2014-04-23 19:45 ` [PATCH v6 0/6] ARM: vdso gettimeofday using generic timer architecture Stephen Boyd
2014-04-24  2:28   ` Nathan Lynch
2014-04-24 17:00     ` Stephen Boyd
2014-04-23 21:50 ` Russell King - ARM Linux
2014-04-24  7:37   ` Ard Biesheuvel
2014-04-24 15:15     ` Nathan Lynch [this message]
2014-04-24 15:25       ` Ard Biesheuvel
2014-04-24 14:59   ` Nathan Lynch
2014-04-24 16:22     ` Russell King - ARM Linux
2014-04-24 18:41       ` Nathan Lynch
2014-04-24 18:45         ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53592A83.2040401@mentor.com \
    --to=nathan_lynch@mentor$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox