binutils-gdb/gas/doc
Eric Botcazou f9402ccaa9 Deal with full path in .file 0 directive
Gas uses the directory part, if present, of the .file 0 directive to set
entry 0 of the directory table in DWARF 5, which represents the "current
directory".

Now Gas also uses the file part of the same directive to set entry 0 of the
file table, which represents the "current compilation file".  But the latter
need not be located in the former so GCC will use a full path in the file
part when it is passed a full path:

gcc -c /full/path/test.c -save-temps

yields:

 .file 0 "/current/directory" "/full/path/test.c"

in the assembly file and:

 The Directory Table (offset 0x22, lines 2, columns 1):
  Entry Name
  0     (indirect line string, offset: 0x25): /current/directory
  1     (indirect line string, offset: 0x38): /full/path

 The File Name Table (offset 0x30, lines 2, columns 2):
  Entry Dir     Name
  0     0       (indirect line string, offset: 0x43): /full/path/test.c

in the object file.  Note the full path and the questionable Dir value in
the 0 entry of the file table.
2021-11-15 12:56:10 +01:00
..
all.texi
as.texi Deal with full path in .file 0 directive 2021-11-15 12:56:10 +01:00
c-aarch64.texi aarch64: Enable Cortex-X2 CPU 2021-09-30 21:01:34 +01:00
c-alpha.texi
c-arc.texi
c-arm.texi arm: enable Cortex-A710 CPU 2021-11-10 14:09:05 +00:00
c-avr.texi Add a -mno-dollar-line-separator command line option to the AVR assembler. 2021-08-11 10:03:19 +01:00
c-bfin.texi
c-bpf.texi
c-cr16.texi
c-cris.texi
c-csky.texi
c-d10v.texi
c-d30v.texi
c-epiphany.texi
c-h8300.texi
c-hppa.texi
c-i386.texi x86: Add -muse-unaligned-vector-move to assembler 2021-10-22 14:45:13 -07:00
c-ia64.texi
c-ip2k.texi
c-lm32.texi
c-loongarch.texi LoongArch gas support 2021-10-24 21:36:32 +10:30
c-m32c.texi
c-m32r.texi
c-m68hc11.texi
c-m68k.texi
c-metag.texi
c-microblaze.texi
c-mips.texi
c-mmix.texi
c-msp430.texi
c-mt.texi
c-nds32.texi
c-nios2.texi
c-ns32k.texi
c-or1k.texi
c-pdp11.texi
c-pj.texi
c-ppc.texi
c-pru.texi
c-riscv.texi RISC-V: Extend .insn directive to support hardcode encoding. 2021-08-31 12:50:27 +08:00
c-rl78.texi
c-rx.texi Fix mistake in RX assembler documentation (special section names) 2021-10-01 16:44:10 +01:00
c-s12z.texi
c-s390.texi
c-score.texi
c-sh.texi
c-sparc.texi
c-tic6x.texi
c-tic54x.texi
c-tilegx.texi
c-tilepro.texi
c-v850.texi
c-vax.texi
c-visium.texi
c-wasm32.texi
c-xc16x.texi
c-xgate.texi
c-xstormy16.texi
c-xtensa.texi
c-z8k.texi
c-z80.texi
fdl.texi
h8.texi
internals.texi
Makefile.am
Makefile.in