pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Sergey Shinderuk <s.shinderuk@postgrespro.ru>
Cc: Thomas Munro <thomas.munro@gmail.com>
Subject: Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.
Date: Tue, 19 Jan 2021 16:00:08 -0500
Message-ID: <522691.1611090008@sss.pgh.pa.us> (raw)
In-Reply-To: <CADvTj4rRKAnd51ATK4izqwqV1oR+NDOzKtZKscAbcqvr85wXfA@mail.gmail.com>
References: <20210119165435.45411-1-james.hilliard1@gmail.com>
	<484263.1611077376@sss.pgh.pa.us>
	<CADvTj4rRKAnd51ATK4izqwqV1oR+NDOzKtZKscAbcqvr85wXfA@mail.gmail.com>

James Hilliard <james.hilliard1@gmail.com> writes:
> I also don't think this is a weak symbol.

> From the header file it is not have __attribute__((weak_import)):
> ssize_t pwritev(int, const struct iovec *, int, off_t)
> __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0),
> watchos(7.0), tvos(14.0));

See the other thread.  I found by looking at the asm output that
what __API_AVAILABLE actually does is cause the compiler to emit
a ".weak_reference" directive when calling a function it thinks
might not be available.  So there's some sort of weak linking
going on, though it's certainly possible that it's not shaped
in a way that'd help us do this the way we'd prefer.

			regards, tom lane





view thread (30+ messages)  latest in thread

Message-ID: <522691.1611090008@sss.pgh.pa.us>
Permalink:  ../522691.1611090008@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/522691.1611090008@sss.pgh.pa.us

 · 

reply

Reply instructions:

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

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, james.hilliard1@gmail.com, s.shinderuk@postgrespro.ru, thomas.munro@gmail.com
  Subject: Re: [PATCH v2 1/1] Fix detection of pwritev support for OSX.
  In-Reply-To: <522691.1611090008@sss.pgh.pa.us>

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

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox