On 23 Oct 2014, at 20:12, Andy Polyakov wrote:
It's not clear to me that we ought to do anything; this is a
problem
only when building using compilers for MacOSX releases that have
long
since been EOLed.
Well, if you can confirm following, then it would still be
appropriate
to revert that change. Compile following snippet with -sectalign
__DATA
__common 4 argument and post nm output for resulting binary.
.text
.globl _main
_main:
ret
.comm _one,4
.comm _two,8
.comm _four,16
Goal is to confirm that _two and _four are actually aligned at their
sized even though section alignment is relaxed.
Here's what I obtained on 10.4.11/ppc:
$ cc -arch i386 -sectalign __DATA __common 4 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -c -o alignments.o alignments.s ; nm
alignments.o
00000010 C _four
00000000 T _main
00000004 C _one
00000008 C _two
No, not -c, but all the way so that it generates executable.
Question is
what is alignment of these variables in *final* executable, not
intermediate .o. I should have been more explicit, sorry.
My bad. Well it does explain why I couldn't interpret the output!
=-=-=-=-=-=-=-=
cc -arch i386 -sectalign __DATA __common 4 -isysroot /Developer/SDKs/
MacOSX10.4u.sdk -o alignments alignments.s
0000200c D _NXArgc
00002008 D _NXArgv
U ___keymgr_dwarf2_register_sections
00002000 D ___progname
U __cthread_init_routine
00001fac t __dyld_func_lookup
00001000 A __mh_execute_header
00001ebe t __start
U _atexit
00002018 S _catch_exception_raise
0000201c S _catch_exception_raise_state
00002020 S _catch_exception_raise_state_identity
00002024 S _clock_alarm_reply
00002028 S _do_mach_notify_dead_name
0000202c S _do_mach_notify_no_senders
00002030 S _do_mach_notify_port_deleted
00002034 S _do_mach_notify_send_once
00002038 S _do_seqnos_mach_notify_dead_name
0000203c S _do_seqnos_mach_notify_no_senders
00002040 S _do_seqnos_mach_notify_port_deleted
00002044 S _do_seqnos_mach_notify_send_once
00002004 D _environ
U _errno
U _exit
0000204c S _four
U _mach_init_routine
00001fb2 T _main
0000205c S _one
00002048 S _receive_samples
00002060 S _two
00001fa0 t dyld_stub_binding_helper
00001e94 T start
=-=-=-=-=-=-=-=
and for comparison:
=-=-=-=-=-=-=-=
cc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -o alignments
alignments.s
0000200c D _NXArgc
00002008 D _NXArgv
U ___keymgr_dwarf2_register_sections
00002000 D ___progname
U __cthread_init_routine
00001fac t __dyld_func_lookup
00001000 A __mh_execute_header
00001ebe t __start
U _atexit
00002020 S _catch_exception_raise
00002024 S _catch_exception_raise_state
00002028 S _catch_exception_raise_state_identity
0000202c S _clock_alarm_reply
00002030 S _do_mach_notify_dead_name
00002034 S _do_mach_notify_no_senders
00002038 S _do_mach_notify_port_deleted
0000203c S _do_mach_notify_send_once
00002040 S _do_seqnos_mach_notify_dead_name
00002044 S _do_seqnos_mach_notify_no_senders
00002048 S _do_seqnos_mach_notify_port_deleted
0000204c S _do_seqnos_mach_notify_send_once
00002004 D _environ
U _errno
U _exit
00002060 S _four
U _mach_init_routine
00001fb2 T _main
00002070 S _one
00002050 S _receive_samples
00002078 S _two
00001fa0 t dyld_stub_binding_helper
00001e94 T start
=-=-=-=-=-=-=-=
-- Patrick
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majord...@openssl.org