aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c')
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c
index 2b9cc6a..517df90 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c
@@ -63,8 +63,16 @@ FUNC (compdir_absolute_ldir_absolute_file_relative_different) \
FUNC (compdir_absolute_ldir_absolute_file_absolute_same) \
FUNC (compdir_absolute_ldir_absolute_file_absolute_different)
+/* Notes: (1) The '*_start' label below is needed because 'name' may
+ point to a function descriptor instead of to the actual code. (2)
+ The '.balign' should specify the highest possible function
+ alignment across all supported architectures, such that the label
+ never points into the alignment gap. */
+
#define FUNC(name) \
- void \
+ asm (".balign 8"); \
+ asm (#name "_start: .globl " #name "_start\n"); \
+ static void \
name (void) \
{ \
v++; \