Unnecessary runtime relocations in gcc shared libraries

H.J. Lu hjl.tools@gmail.com
Fri Aug 15 16:12:00 GMT 2008


On Wed, Aug 13, 2008 at 4:14 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>
> I think the important question is how much bigger this will make libgcc_s,
> how many extra runtime relocations it will have and how much bigger will be

Since we are on extra runtime relocations, there are many unnecessary runtime
relocations in gcc shared libraries. For example, a function, foo, in
libgcc_s.so
may call another function, bar, in libgcc_s.so. It isn't necessary at all.  On
Linux/x86-64, the following runtime relocations:

+__addtf3
+__deregister_frame_info
+__deregister_frame_info_bases
+__divtf3
+__eqtf2
+__fixunsdfti
+__fixunssfti
+__fixunsxfti
+__floatuntixf
+__lttf2
+__multf3
+__netf2
+__register_frame_info
+__register_frame_info_bases
+__register_frame_info_table
+__register_frame_info_table_bases
+__subtf3
+_Unwind_Find_FDE
+_Unwind_GetCFA
+_Unwind_GetDataRelBase
+_Unwind_GetGR
+_Unwind_GetIPInfo
+_Unwind_GetLanguageSpecificData
+_Unwind_GetRegionStart
+_Unwind_GetTextRelBase
+_Unwind_RaiseException
+_Unwind_SetGR
+_Unwind_SetIP

in libgcc_s.so aren't needed. In libstdc++.so, we have 481 unnecessary
runtime relocations. In libobjc.so, we have 124. In libgfortran, we have
142.

-- 
H.J.



More information about the Gcc-patches mailing list