Skip to content

buildpaths generated into .debug_str #62192

@kraj

Description

@kraj

This attached example is emitting absolute build time paths into .debug_str section when compiled with Clang 16.0.1
The path is computed from source file location specified on cmdline. This seems to work ok when -fno-integrated-asm is used.

Here is the strings output and also readelf output.

% strings a.o|grep /mnt
(lambda at /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libcereal/1.3.2+gitAUTOINC+ebef1e9298-r0/build/unittests/a.cpp:46197:11)
~(lambda at /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libcereal/1.3.2+gitAUTOINC+ebef1e9298-r0/build/unittests/a.cpp:46197:11)
% readelf -x 4271 a.o | grep mnt
  0x001bf100 6d626461 20617420 2f6d6e74 2f622f79 mbda at /mnt/b/y

test.tar.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions