gpt4 book ai didi

android - 带有公司名称的共享对象和资源文件?

转载 作者:太空宇宙 更新时间:2023-11-04 03:57:00 24 4
gpt4 key购买 nike

我正在解决 Android 手机问题。我找不到适用于我的 HTC EVO 4G (Kingdom) 的模组。显然,一家名为 DxO Labs used DMCA to force Cyanogenmod to remove some HTC mods 的公司.

我想要获取 DxO Labs 在 EVO 上构建的共享对象的列表。我拥有该设备,因此我可以枚举设备上的所有共享对象。我不知道 ELF DSO 是否是使用(或可以使用)公司信息(如 Windows 可执行文件)构建的。我不记得见过它们,但我不相信我曾经看过。

ELF 格式的 Linux 可执行文件和共享对象是否具有与 Windows 资源文件类似的机制?抱歉不得不问。我无法像其他平台一样在 Android 的 ELF 文件格式和 ABI 上查找文档。

最佳答案

查看SYSTEM V APPLICATION BINARY INTERFACE ,可以用公司信息标记对象。从第 81 页,注释部分:

Sometimes a vendor or system builder needs to mark an object file with special information that other programs will check for conformance, compatibility, etc. Sections of type SHT_NOTE and program header elements of type PT_NOTE can be used for this purpose. The note information in sections and program header elements holds any number of entries, each of which is an array of 4-byte words in the format of the target processor. Labels appear below to help explain note information organization, but they are not part of the specification.

+----------------+
| namesz |
+----------------+
| descz |
+----------------+
| type |
+----------------+
| name |
+----------------+
| desc |
+----------------+

namesz and name: The first namesz bytes in name contain a null-terminated character representation of the entry’s owner or originator. There is no formal mechanism for avoiding name conflicts. By convention, vendors use their own name, such as ‘‘XYZ Computer Company,’’ as the identifier. If no name is present, namesz contains 0. Padding is present, if necessary, to ensure 4-byte alignment for the descriptor. Such padding is not included in namesz.

descsz and desc: The first descsz bytes in desc hold the note descriptor. The ABI places no constraints on a descriptor’s contents. If no descriptor is present, descsz contains 0. Padding is present, if necessary, to ensure 4-byte alignment for the next note entry. Such padding is not included in descsz.

type: This word gives the interpretation of the descriptor. Each originator controls its own types; multiple interpretations of a single type value may exist. Thus, a program must recognize both the name and the type to ‘‘understand’’ a descriptor. Types currently must be nonnegative. The ABI does not define what descriptors mean.

从有关供应商扩展的第 115 页开始:

Besides the services listed above, libc may contain other symbols. An ABI-conforming system vendor may add a symbol to the C library to provide vendor-specific services. The ABI does not define these services, and programs using these services are not ABI-conforming. Nonetheless, the ABI defines a recommended extension mechanism, providing a way to avoid conflict among the services from multiple vendors.

A symbol of the form _$vendor.company. company provides an operating system entry for the vendor named company. The C library does not have unadorned alternatives for these names. Conventionally, a vendor uses the single name to provide multiple services, letting the first argument to _$vendor.company select among the alternatives. As an example, the ‘‘XYZ Computer Company’’ might add _$vendor.xyz to the C library.

关于android - 带有公司名称的共享对象和资源文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24353710/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com