Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-5848 Make Qt for Symbian build with RVCT4
  3. QTBUG-7006

Symbols visibility interworking between Qt and Symbian worlds is broken

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Done
    • P2: Important
    • None
    • None
    • None
    • RVCT4-supporting Symbian release, RVCT4 compiler

    Description

      RVCT4 obeys the ELF symbols visibility rules - specifically, that references that have hidden visibility cannot be linked to definitions that have default visibility. This causes us a problem on the Symbian-Qt boundary due to class impedimenta.

      In Qt, we disable automatic export of all class impedimenta (ie. we don't use --export_all_vtbl) because a) class-level exporting is used, and therefore this already indicates which classes need their impedimenta exporting; and b) if we used it we would need to mark all the classes that are not exported with __declspec(notshared), which would be tedious.

      However, this is causing problems on the Symbian-Qt boundary when Qt uses Symbian classes - XLeaveException is a prime example. References to the typeinfo for that class would normally be given default visibility because --export_all_vtbl would be specified, but for Qt code that isn't the case. What then happens is that a reference to the typeinfo gets created with hidden visibility (as you'd expect). When the linker comes to finding a definition, it can only see the one with default visibility in the compiler support libraries (because they were built with --export_all_vtbl, being Symbian code), and refuses to link the two together.

      What is needed is a flag to the linker to tell it to ignore the ELF visibility rules in these cases, and perform the link. The other alternatives such as trying to use class level exports on the Symbian classes aren't really viable as too much would be exported in many cases, and it would affect Symbian-Symbian linkage too (because we'd export stuff that we didn't want to).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            riskedal Espen Riskedal (closed Nokia identity) (Inactive)
            iacampbe Iain (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes