summaryrefslogtreecommitdiffstats
path: root/bin/elf2e32_qtwrapper
Commit message (Collapse)AuthorAgeFilesLines
* Fixed several problems with the postlinker for Symbian (elf2e32).axis2010-06-241-0/+145
The fixes were too complicated for a profile and so a perl script was introduced. These are the issues that were addressed: - Made sure that we link correctly in all cases where there is a mismatch between the DEF file and the ELF file. Specifically, these two cases: - If elf2e32 detects a symbols in the ELF file that is marked as absent in the DEF file, an ordinal mapping will not be generated in the dso file. This means that binaries linking to the library will not find the symbol, even though it exists in the code. Since this is completely useless behavior, this was fixed to include the symbol regardless. - If the DEF file contains a symbol that is not present in the ELF file, an ordinal mapping will be created in the dso file regardless, which means applications can link to a symbol that does not exist. This is even worse than point one, since it is not detected until runtime, when the dynamic link will fail. Fixed by leaving the symbol out of the dso file if it does not exist in the ELF file. Both fixes require rerunning elf2e32 to fix the symbol mappings that were broken in the first run, but it only happens if at least one symbol is broken in the way described above. Also, freezing the DEF files will "save" the symbols, so that it does not occur after that. Note that this does not remove the ability to get the postlinker to tell you about mismatches. By doing "QMAKE_ELF2E32_FLAGS -= --unfrozen", the symbol mismatches will be considered errors instead of warnings, and they can be caught that way. - Code that was previously in the profile was moved to the perl script: - Detecting that there are errors in the postlink and return nonzero. elf2e32 does not do this on its own (at least not when using Wine). - Only overwriting the old dso file if the new one is different. This saves build time, since binaries that depend on the library do not trigger relink if the dso has not changed. These two points simplify the code, and they will also help the porting to Windows, since the old shell script tricks would not have worked there. RevBy: Trust me