Build errors while adding a new func to Region Map
Christian Helmuth
christian.helmuth at genode-labs.com
Fri Feb 4 08:31:25 CET 2022
Hello Sid,
you chose most difficult place to play around with RPC functions - the
base API. I'd recommend to follow the hello-wrold tutorial [1] for
your initial steps.
Regarding your remaining question...
On Fri, Feb 04, 2022 at 05:14:30 CET, Sid Agrawal wrote:
> I still have the questions of whether changing the ld file is expected?
>
> On Thu, Feb 3, 2022 at 6:48 PM Sid Agrawal <siagraw at cs.ubc.ca> wrote:
> > Error: size of '_ZTVN6Genode17Region_map_clientE' symbol violates ld ABI
> > (72 bytes in ABI, 80 bytes in library)
> > make[3]: *** [/home/siagraw/genode/repos/base/mk/lib.mk:244:
> > ld-sel4.lib.checked] Error 255
> > make[2]: *** [var/libdeps:200: ld-sel4.lib] Error 2
> >
> >
> > I am least sure of this change. I am unsure if this is a file I should
> > even be modifying for something as simple as adding a new RPC method. But I
> > did change it to get past the build error.
In Genode, we established the notion of an explicit ABI to clearly
separate (platform-specific) library implementations from the clients
using the library API. This supports building components for CPU
architectures (e.g., x86_64) that are effectively kernel-agnostic and
can be run on NOVA, seL4, and Fiasco.OC without recompilation [2].
You added an additional virtual function to Genode::Region_map, which
I'd expect to add another entry to the vtable. Running
> echo '_ZTVN6Genode17Region_map_clientE' | c++filt -t
vtable for Genode::Region_map_client
reveals that our ABI checker is nagging about insufficient size of the
vtable specified in the symbols file for ld.lib.so, which comprises
the Genode base ABI implementation (incl. Genode::Region_map and
Genode::Region_map_client). For this reason, you had to adapt the
symbols spec to fit the vtable, but had not to add another global
function.
[1] https://genode.org/documentation/genode-foundations/21.05/getting_started/Hello_world.html
[2] https://genode.org/documentation/release-notes/17.02#Genode_Application_Binary_Interface
https://youtu.be/fMahg-01Qbw
Regards
--
Christian Helmuth
Genode Labs
https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · https://genodians.org/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list