Re: Apple's ranlib warns about protocol_openssl.c - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Apple's ranlib warns about protocol_openssl.c
Date
Msg-id 20220927043143.6jjwuu7h6kx5siml@awork3.anarazel.de
Whole thread Raw
In response to Re: Apple's ranlib warns about protocol_openssl.c  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
Hi,

On 2021-12-16 21:13:20 +0100, Daniel Gustafsson wrote:
> > On 16 Dec 2021, at 19:22, Tom Lane <tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [RFC] building postgres with meson - v13
Next
From: Andres Freund
Date:
Subject: Re: [RFC] building postgres with meson - v13