From owner-freebsd-arch@freebsd.org Tue May 8 21:39:07 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5468FCB028 for ; Tue, 8 May 2018 21:39:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A203773FE for ; Tue, 8 May 2018 21:39:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w48LctSL083896 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 9 May 2018 00:38:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w48LctSL083896 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w48LctaY083895; Wed, 9 May 2018 00:38:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 9 May 2018 00:38:55 +0300 From: Konstantin Belousov To: Phil Shafer Cc: freebsd-arch@freebsd.org Subject: Re: initialization problem w/ thread-specific .tbss data on i386 Message-ID: <20180508213855.GS6887@kib.kiev.ua> References: <20180508081417.GL6887@kib.kiev.ua> <201805082131.w48LVvBo071075@idle.juniper.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201805082131.w48LVvBo071075@idle.juniper.net> User-Agent: Mutt/1.9.5 (2018-04-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2018 21:39:07 -0000 On Tue, May 08, 2018 at 05:31:57PM -0400, Phil Shafer wrote: > Konstantin Belousov writes: > >Also, try to link in libpthread. > > This was interesting, not that I'm sure what it means: > > % env LD_PRELOAD=/usr/lib/libpthread.so /tmp/uptime > 5:26PM up 4 days, 9:22, 3 users, load averages: 0.55, 0.52, 0.51 > > (where /tmp/uptime is a symlink to /usr/obj/.../w/w). > (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552) > > Does the mean that the use of __thread requires -lpthread? My > understanding was that the startup code handled thread-specific > data for the main thread of execution. No, try to compile libc with e.g. clang 5 and see if it also fixes libxo.