Re: Apple's ranlib warns about protocol_openssl.c

From: Andres Freund <andres(at)anarazel(dot)de>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Apple's ranlib warns about protocol_openssl.c
Date: 2022-09-27 04:31:43
Message-ID: 20220927043143.6jjwuu7h6kx5siml@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-12-16 21:13:20 +0100, Daniel Gustafsson wrote:
> > On 16 Dec 2021, at 19:22, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > Having said that, I'm not seeing any such warning when I build
> > with openssl 1.1.1k on my own Mac, so I'm a bit confused why
> > Thomas sees it.
>
> Maybe it's dependant on macOS/XCode release? I see the warning on my Catalina
> laptop.

I think it might an x86_64 vs arm64 thing.

cd ~/build/postgres/dev-assert/vpath/src/common

$ cat protocol_openssl.s
.section __TEXT,__text,regular,pure_instructions
.build_version macos, 12, 0 sdk_version 12, 3
.subsections_via_symbols

$ as -arch arm64 protocol_openssl.s -o protocol_openssl-arm64.o
$ as -arch x86_64 protocol_openssl.s -o protocol_openssl-x86_64.o

$ llvm-objdump -t protocol_openssl-x86_64.o

protocol_openssl-x86_64.o: file format mach-o 64-bit x86-64

SYMBOL TABLE:

$ llvm-objdump -t protocol_openssl-arm64.o

protocol_openssl-arm64.o: file format mach-o arm64

SYMBOL TABLE:
0000000000000000 l F __TEXT,__text ltmp0

For some reason arm64 ends up with that ltmp0 symbol, which presumably
prevents the warning from being triggered.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-09-27 04:48:21 Re: [RFC] building postgres with meson - v13
Previous Message Thomas Munro 2022-09-27 04:29:27 Re: [RFC] building postgres with meson - v13