小编Mul*_*Kid的帖子

aarch64 的 glibc 版本

aarch64我正在我的系统上交叉编译应用程序x86 Ubuntu Bionic,但遇到glibc版本不匹配的问题。我的交叉编译工具链使用 v2.27,而运行应用程序的系统使用 v2.24。我认为可能是因为我的工具链版本太高,所以我决定降级。

删除所有以前的交叉编译安装后,我安装了gcc-4.8-aarch64-linux-gnu(因为我已经在不同的主机系统上成功地使用此版本交叉编译了应用程序),认为它会安装旧版本aarch64glibcto /usr/aarch64-linux-gnu/lib/。然而,再次安装了v2.27(我在安装新的交叉编译工具链之前验证了该目录不存在)。

所以我的问题是双重的:

  1. 安装时什么决定了我的系统上安装的是哪个aarch64版本?它与我自己的系统版本直接相关吗?glibcgcc-4.8-aarch64-linux-gnux86glibc
  2. 是否有在我的系统上安装v2.24(或更低aarch64版本glibc)版本的正确方法?

linux ubuntu glibc libc

7
推荐指数
1
解决办法
7252
查看次数

Vulkan 中的 YCbCr 采样器

我一直在尝试在 Vulkan 中对 YCbCr 图像进行采样,但我一直得到不正确的结果,我希望有人能够发现我的错误。

我有一个 NV12 YCbCr 图像,我想将其渲染到形成四边形的两个三角形上。如果我理解正确,对应于 NV12 的 VkFormat 是 VK_FORMAT_G8_B8R8_2PLANE_420_UNORM。下面是我希望工作的代码,但我也会尝试解释我正在尝试做的事情:

  1. 在 pNext 中使用 VkSamplerYcbcrConversion(具有正确的格式)创建 VkSampler
  2. 将 NV12 数据读入暂存缓冲区
  3. 使用正确的格式创建 VkImage 并指定平面不相交
  4. 获取每个平面(0 和 1)的内存要求(以及平面 1 的偏移量)
  5. 为图像数据分配设备本地内存
  6. 将每个平面绑定到内存中的正确位置
  7. 将暂存缓冲区复制到图像内存
  8. 使用与 VkImage 相同的格式和与 pNext 中的 VkSampler 相同的 VkSamplerYcbcrConversionInfo 创建 VkImageView。

代码:

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)

c++ yuv vulkan

6
推荐指数
1
解决办法
1412
查看次数

区分ELF文件中的.shstrtab和.strtab

我想知道解析 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)

linux elf string-table

4
推荐指数
1
解决办法
5429
查看次数

标签 统计

linux ×2

c++ ×1

elf ×1

glibc ×1

libc ×1

string-table ×1

ubuntu ×1

vulkan ×1

yuv ×1