ribbons / android-rsync

Build script to cross-compile rsync for Android.
GNU General Public License v3.0
30 stars 7 forks source link

`WARNING: linker: /data/local/tmp/rsync: unsupported flags DT_FLAGS_1=0x8000001` under Android 7 and below #39

Open fzyzcjy opened 1 year ago

fzyzcjy commented 1 year ago

Hi thanks for the lib! However it is having warnings as follows:

$ /data/local/tmp/rsync --help                                                                                                         
WARNING: linker: /data/local/tmp/rsync: unsupported flags DT_FLAGS_1=0x8000001
rsync  version 3.2.7  protocol version 31
Copyright (C) 1996-2022 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    no socketpairs, symlinks, sy
...
ribbons commented 1 year ago

Thanks for your issue report - that's a new warning to me :smile:. Are you able to provide some details about your device (particularly the Android version and architecture)?

fzyzcjy commented 1 year ago

Sure! It is an old one: Android 7.0, 32bit architecture.

Thanks for your reply :)

ribbons commented 1 year ago

Slightly old but not ancient :smile:. The Android NDK that's currently being used to build rsync (23.2) supports down to API level 16 whereas Android 7.0 is API level 24 so it is definitely a supported platform.

To me, that warning is a bit confusing - I thought it meant that it didn't support both of flags set (0x1 and 0x8000000) but it is actually just printing FLAGS_1 as not all of the flags are supported.

However, this commit explains why I've not seen the warning on more recent versions of Android but you are under 7.0: DF_1_PIE (0x8000000) was added to the list of 'supported' flags in Android 8 although no change was actually needed in the linker.

That is a bit of a roundabout way of saying that to the best of my understanding this is an annoying but entirely harmless warning... In theory it looks like it should be possible to modify the built binaries to unset DF_1_PIE without causing any issues but I'm not entirely sure how...

fzyzcjy commented 1 year ago

I see, thank you!