aarch64我正在我的系统上交叉编译应用程序x86 Ubuntu Bionic,但遇到glibc版本不匹配的问题。我的交叉编译工具链使用 v2.27,而运行应用程序的系统使用 v2.24。我认为可能是因为我的工具链版本太高,所以我决定降级。
删除所有以前的交叉编译安装后,我安装了gcc-4.8-aarch64-linux-gnu(因为我已经在不同的主机系统上成功地使用此版本交叉编译了应用程序),认为它会安装旧版本aarch64的glibcto /usr/aarch64-linux-gnu/lib/。然而,再次安装了v2.27(我在安装新的交叉编译工具链之前验证了该目录不存在)。
所以我的问题是双重的:
aarch64版本?它与我自己的系统版本直接相关吗?glibcgcc-4.8-aarch64-linux-gnux86glibcaarch64版本glibc)版本的正确方法?我一直在尝试在 Vulkan 中对 YCbCr 图像进行采样,但我一直得到不正确的结果,我希望有人能够发现我的错误。
我有一个 NV12 YCbCr 图像,我想将其渲染到形成四边形的两个三角形上。如果我理解正确,对应于 NV12 的 VkFormat 是 VK_FORMAT_G8_B8R8_2PLANE_420_UNORM。下面是我希望工作的代码,但我也会尝试解释我正在尝试做的事情:
代码:
VkSamplerYcbcrConversion ycbcr_sampler_conversion;
VkSamplerYcbcrConversionInfo ycbcr_info;
VkSampler ycbcr_sampler;
VkImage image;
VkDeviceMemory image_memory;
VkDeviceSize memory_offset_plane0, memory_offset_plane1;
VkImageView image_view;
enum YCbCrStorageFormat
{
NV12
};
unsigned char* ReadYCbCrFile(const std::string& filename, YCbCrStorageFormat storage_format, VkFormat vulkan_format, uint32_t* buffer_size, uint32_t* buffer_offset_plane1, uint32_t* buffer_offset_plane2)
{ …Run Code Online (Sandbox Code Playgroud) 我想知道解析 ELF 文件时.shstrtab与 a 相比如何识别a ?.strtab从阅读elf(5) - Linux 手册页来看,两者都是节标题类型SHT_STRTAB,那么我如何知道我遇到的是其中之一呢?
他们的描述是:
.shstrtab
This section holds section names. This section is of type
SHT_STRTAB. No attribute types are used.
Run Code Online (Sandbox Code Playgroud)
.strtab
This section holds strings, most commonly the strings that
represent the names associated with symbol table entries. If
the file has a loadable segment that includes the symbol
string table, the section's attributes will include the
SHF_ALLOC bit. Otherwise, the bit will be off. …Run Code Online (Sandbox Code Playgroud)