[LLVMbugs] [Bug 5329] Global ctor/dtor priorities not codegened correctly

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Dec 4 12:26:07 PST 2011


Anton Korobeynikov <asl at math.spbu.ru> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #5 from Anton Korobeynikov <asl at math.spbu.ru> 2011-12-04 14:26:07 CST ---
Ok, in fact the patch is incomplete. While it will solve the stuff in the
single .o file, it won't solve the problem when several functions are emitted
into the different .o files - the linker will just merge the init_array
sections alltogether thus making the construction priorities bogus.

The solution I can think of is to emit the functions with constructor priority
N into the section, say, init_array.N and dtor - init_array.(65535-N). This way
everything will be ok.

Also, we should not worry about Darwin - according to Nick Kledzik, Darwin does
not support ctor / dtor priorities at all.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list