将GMP链接到裸机程序 [英] Linking GMP into a baremetal program

查看:82
本文介绍了将GMP链接到裸机程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些依赖库的代码,即筑波大学椭圆配对库.该库本身依赖于GMP.我想在ARM内核上(特别是在beaglebone黑色上)运行该程序裸机程序.

I have some code which relies on a library, namely the University of Tsukuba Elliptic Pairing Library. This library itself relies on GMP. I'd like to run this program baremetal on an ARM core, specifically on a beaglebone black.

GMP是一个庞大的库,因此,如果可能的话,我宁愿交叉编译.我还希望使用强力"解决方案以外的方法,该解决方案是将整个GMP源代码简单地转储到与程序相同的文件中,然后将其推入arm-none-eabi-gcc.

GMP is a massive library, so I'd prefer to cross-compile if possible. I'd also prefer something other than the ``brute force" solution of simply dumping the entire GMP source code into the same file as my program and pushing it into arm-none-eabi-gcc.

将非平凡的库链接到裸机代码的标准方法是什么?

What is the standard method for linking nontrivial libraries into baremetal code?

推荐答案

在这种特定情况下,只要从TEPLA中删除了很多功能,mini-gmp就足够了.对于我的目的而言,这已经足够了,但是却不是令人满意的答案-我链接非平凡库的解决方案是改为链接平凡库.尽管我的确切问题已解决,但如果有人有任何更聪明的主意,我将保留此问题.

In this specific case, mini-gmp is sufficient, providing a bunch of functionality is removed from TEPLA. This is sufficient for my purposes, but hardly a satisfying answer -- my solution to linking a nontrivial library is to instead link a trivial library. Though my exact problem is solved, I'll be leaving this question open in case someone has any cleverer ideas.

这篇关于将GMP链接到裸机程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆