gas: Multiple default version .file directives

Fangrui Song i@maskray.me
Fri Feb 5 07:58:50 GMT 2021


For ELF, the default version .file directive can be specified multiple
times to create multiple STT_FILE symbols. It looks like that in the
symbol table, local symbols (including section symbols) are ordered
after their preceding .file directives. So is this a guaranteed
behavior?  (https://sourceware.org/binutils/docs/as/File.html#File does
not document this)

.file   "2.cc"
l2:

.file   "1.cc"
l1:
.section .xxx,"a"
.long .xxx

.file   "0.cc"
l0:
.section .yyy,"a"
.long .yyy


More information about the Binutils mailing list