Bug ID: 30494
           Summary: -fuse-init-array has no effect (-triple
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
    Classification: Unclassified

Clang HEAD on FreeBSD 10.3/amd64.
The sample global constructor used here is at

% bin/clang-4.0 -v -c -fuse-init-array

 "/tank/emaste/src/llvm/build-nodebug/bin/clang-4.0" -cc1 -triple
x86_64-unknown-freebsd10.3 -emit-obj -mrelax-all -disable-free -main-file-name -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -v -dwarf-column-info
-debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=gdb
-coverage-notes-file /tank/emaste/src/snippets/global_constructor.gcno
-resource-dir /tank/emaste/src/llvm/build-nodebug/bin/../lib/clang/4.0.0
-internal-isystem /usr/include/c++/v1 -fdeprecated-macro
-fdebug-compilation-dir /tank/emaste/src/snippets -ferror-limit 19
-fmessage-length 149 -fobjc-runtime=gnustep -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o global_constructor.o -x c++

The resulting object file still uses .ctors:

% readelf -S global_constructor.o | egrep -A1 'init|fini|ctor|dtor'             
  [ 9] .ctors            PROGBITS         0000000000000000  000000d8
       0000000000000008  0000000000000000  WA       0     0     8
  [10] .rela.ctors       RELA             0000000000000000  00000370
       0000000000000018  0000000000000018          15     9     8

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to