Run-time identification of dependencies during dynamic linking

US11340914B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11340914-B2
Application numberUS-202017076485-A
CountryUS
Kind codeB2
Filing dateOct 21, 2020
Priority dateOct 21, 2020
Publication dateMay 24, 2022
Grant dateMay 24, 2022

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Run-time identification of dependencies during dynamic linking. A dynamic linker accesses contents of a first executable file that is to be executed. The dynamic linker, based on the contents of the first executable file, determines that the first executable file includes a first dynamic dependency function configured to be executed by the dynamic linker. The dynamic linker invokes the first dynamic dependency function of the first executable file. The dynamic linker receives, from the first dynamic dependency function, a first run-time dependency identifier that identifies a first run-time dependency, and adds the first run-time dependency identifier to a dependency identifier list.

First claim

Opening claim text (preview).

What is claimed is: 1. A method comprising: accessing, by a dynamic linker executing on a computing device comprising a processor device, contents of an executable file that is to be executed; determining, by the dynamic linker, based on the contents of the executable file, that the executable file includes a first dynamic dependency function configured to be executed by the dynamic linker; invoking, by the dynamic linker, the first dynamic dependency function of the executable file; receiving, by the dynamic linker from the first dynamic dependency function, a first run-time dependency identifier that identifies a first run-time dependency; and adding the first run-time dependency identifier to a dependency identifier list prioritizing dependencies providing a higher symbol-matching priority to map an unresolved symbol in the executable file to the first run-time dependency to override a previously identified run-time dependency in the dependency identifier list. 2. The method of claim 1 wherein the first run-time dependency comprises a shared library. 3. The method of claim 2 wherein the executable file comprises a shared library. 4. The method of claim 3 further comprising: identifying, by the dynamic linker, an unresolved symbol in the executable file; identifying, by the dynamic linker, a symbol in the first run-time dependency that matches the unresolved symbol; and mapping, by the dynamic linker, the unresolved symbol to the symbol in the first run-time dependency. 5. The method of claim 1 wherein determining that the executable file includes the first dynamic dependency function configured to be executed by the dynamic linker comprises identifying, by the dynamic linker, data in the contents of the executable file comprising a dynamic dependency function indicator that indicates the executable file includes the first dynamic dependency function. 6. The method of claim 1 wherein the executable file comprises an Executable Linkable Format (ELF) file. 7. The method of claim 1 further comprising identifying, in an execution environment into which contents of the executable file have been loaded, an address pointer that identifies a location of the first dynamic dependency function. 8. The method of claim 1 further comprising: obtaining, by the dynamic linker, environment information, the environment information comprising processor device information that identifies characteristics of the processor device; and providing, by the dynamic linker to the first dynamic dependency function, the environment information. 9. The method of claim 8 wherein the environment information comprises one or more of a process auxiliary vector of the executable file or a process environment vector of the executable file. 10. The method of claim 1 further comprising: allocating, by the dynamic linker, a first quantity of memory; and providing, by the dynamic linker to the first dynamic dependency function, a pointer to an initial address of the first quantity of memory. 11. The method of claim 10 wherein receiving, by the dynamic linker from the first dynamic dependency function, the first run-time dependency identifier that identifies the first run-time dependency comprises obtaining, from the first quantity of memory, the first run-time dependency identifier. 12. The method of claim 10 further comprising: receiving, by the dynamic linker from the first dynamic dependency function, an indication that the first quantity of memory is insufficient; allocating, by the dynamic linker, a second quantity of memory that is larger than the first quantity of memory; and providing, by the dynamic linker to the first dynamic dependency function, a pointer to an initial address of the second quantity of memory. 13. The method of claim 1 further comprising: allocating, by the dynamic linker, a quantity of memory; obtaining, by the dynamic linker, environment information, the environment information comprising a processor device identifier; and providing, by the dynamic linker to the first dynamic dependency function, the environment information and a pointer to an initial address of the quantity of memory. 14. The method of claim 1 further comprising: accessing, by the dynamic linker, a first run-time dependency executable file that corresponds to the first run-time dependency; determining, by the dynamic linker, based on contents of the first run-time dependency executable file, that the first run-time dependency executable file includes a second dynamic dependency function configured to be executed by the dynamic linker; invoking, by the dynamic linker, the second dynamic dependency function of the first run-time dependency executable file; receiving, by the dynamic linker from the second dynamic dependency function, a second run-time dependency identifier that identifies a second run-time dependency; and adding the second run-time dependency identifier to the dependency identifier list. 15. The method of claim 14 further comprising: identifying, by the dynamic linker, an unresolved symbol in the executable file; identifying, by the dynamic linker, a symbol in the second run-time dependency that matches the unresolved symbol; and mapping, by the dynamic linker, the unresolved symbol to the symbol in the second run-time dependency. 16. The method of claim 14 wherein adding the second run-time dependency identifier to the dependency identifier list further comprises: adding the second run-time dependency identifier to the dependency identifier list providing a higher symbol-matching priority to the second run-time dependency than the first run-time dependency; identifying, by the dynamic linker, an unresolved symbol in the executable file, wherein the first run-time dependency and the second run-time dependency each have a symbol that matches the unresolved symbol; identifying, by the dynamic linker, a symbol in the second run-time dependency that matches the unresolved symbol; and mapping, by the dynamic linker, the unresolved symbol to the symbol in the second run-time dependency. 17. The method of claim 1 wherein the executable file comprises an ELF file, and wherein determining, by the dynamic linker, based on contents of the executable file, that the executable file includes the first dynamic dependency function configured to be executed by the dynamic linker comprises: accessing a PT_DYNAMIC element in a program header table of the executable file; accessing, based on the PT_DYNAMIC element, a dynamic segment of the executable file; and identifying, in the dynamic segment, a tag that indicates that the executable file includes the first dynamic dependency function configured to be executed by the dynamic linker. 18. The method of claim 1 further comprising: transferring control, by the dynamic linker to the processor device, to an entry point of the executable file that identifies a first executable instruction of the executable file. 19. A computing device, comprising: a memory; and a processor device coupled to the memory to: access, by a dynamic linker, an executable file that is to be executed; determine, by the dynamic linker, based on the executable file, that the executable file includes a dynamic dependency function; invoke, by the dynamic linker, the dynamic dependency function; receive, by the dynamic linker from the dynamic dependency function, a run-time dependency identifier that identifies a run-time dependency; and add the run-time dependency identifier to a dependency

Assignees

Inventors

Classifications

  • Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading · CPC title

  • Dependency analysis; Data or control flow analysis · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11340914B2 cover?
Run-time identification of dependencies during dynamic linking. A dynamic linker accesses contents of a first executable file that is to be executed. The dynamic linker, based on the contents of the first executable file, determines that the first executable file includes a first dynamic dependency function configured to be executed by the dynamic linker. The dynamic linker invokes the first dy…
Who is the assignee on this patent?
Red Hat Inc
What technology area does this patent fall under?
Primary CPC classification G06F9/44521. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue May 24 2022 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).