[Xorg] [PATCH] fix configure.ac and Makefile.am to allow x86emu
Kristian Høgsberg
krh at bitplanet.net
Wed Jul 14 08:47:12 PDT 2004
Jakub Piotr Cłapa wrote:
> Kristian Høgsberg wrote:
>
>> Yes, I have the i830 driver running, but there were other problems:
>> since libvbe.a and libfb.a are linked into the Xorg binary at link
>> time, the linker throws aways .o files from the .a file that aren't
>> used by the server binary, e.g.
>>
>> [krh at dinky debrix]$ nm Xorg |grep fbPi
>> 0812b650 T fbPixmapToRegion
>>
>> no fbPictureInit, but maybe I'm doing something wrong? This happens to
>> vbeModes.o and fbpict.o so I added dummy references to symbols in
>> those files to get them linked in. I810VideoInit() segfaults, but I
>> disabled that for now and then it works.
>
>
> I posted a patch for this here. Look in the archives. The explanation of
> how is the symbol garbage collection working can also be found there.
It's just the difference between linking against libvbe.a vs. linking
against the object files directly. When you link against an archive,
the linker only includes those .o files that contain symbols referenced
by the application. This is why it's enough to only reference one
symbol from each file to get it linked in. On the other hand, if you
list the object files explicitly on the link command line all the object
files are added to the application, wether or not they are used.
Anyway, to get i830 going I added fbPictureInit and VBEGetModePool to
xf86sym.c:
--- orig/hw/xorg/loader/xf86sym.c
+++ mod/hw/xorg/loader/xf86sym.c
@@ -1216,5 +1216,9 @@
/* shadowfb */
SYMFUNC(ShadowFBInit)
+ /* KRH: Hack to pull in symbol defined in otherwise unused .o files */
+ SYMFUNC(VBEGetModePool)
+ SYMFUNC(fbPictureInit)
+
{0, 0}
};
Kristian
More information about the xorg
mailing list