Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DWARF] Use ULEB128 and not just one byte for directory indices #109067

Merged
merged 4 commits into from
Sep 24, 2024

Commits on Sep 17, 2024

  1. [DWARF] Use ULEB128 and not just one byte for directory indices

    According to the standard `DW_LNCT_directory_index` can be `data1`, `data2`,
    or `udata` (see 6.2.4.1). The code was using `data1`, but this limits the
    number of directories to 256, even if the variable holding the directory
    index is a `uint64_t`. `dsymutil` was hitting an assertion when trying
    to write directory indices higher than 255.
    
    Modify the classic and the parallel DWARF linkers to use `udata` and
    encode the directory indices as ULEB128 and provide a test that has more
    than 256 directories to check the changes are working as expected.
    
    For people that were using `dsymutil` with CUs that had between 128-256
    directories, this will mean that for those indices 2 bytes will be used
    now, instead of just one.
    drodriguez committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    aaae8ca View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. Remake the test in Python to avoid large test.

    - Use `.test` as the extension. Remove `.ll` from test extensions.
    - The output generated by Python is the same, except for the checksum
      fields, which are constant, but does not seem to matter.
    drodriguez committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    d3f62ef View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70f444d View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    be20162 View commit details
    Browse the repository at this point in the history