aboutsummaryrefslogtreecommitdiff
path: root/gas/as.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-03-12 13:27:38 +1030
committerAlan Modra <amodra@gmail.com>2023-03-14 12:14:32 +1030
commitadb9ac5f3984b4ad2d8be1550dc5683d6129e1a6 (patch)
treef0c3287356bda7212583c29ef9b1dedc5a4244a5 /gas/as.c
parenta2aee680684ec8c79bbdc169d73fe5111e8e9a64 (diff)
downloadgdb-adb9ac5f3984b4ad2d8be1550dc5683d6129e1a6.zip
gdb-adb9ac5f3984b4ad2d8be1550dc5683d6129e1a6.tar.gz
gdb-adb9ac5f3984b4ad2d8be1550dc5683d6129e1a6.tar.bz2
gas .include and .incbin
This fixes a bug in .include and .incbin where given an absolute path the -I dirs would be searched for the path. * read.c (include_dir_count, include_dir_maxlen): Make them size_t. (search_and_open): New function. (s_incbin, s_include): Use search_and_open. (init_include_dir): New function. (add_include_dir): Don't set initial "." dir here. * read.h (include_dir_count, include_dir_maxlen): Update. (init_include_dir, search_and_open): Declare. * as.c (gas_early_init): Call init_include_dir. * config/tc-rx.c (rx_include): Avoid warning by using size_t. * config/tc-tic54x.c (tic54x_set_default_include): Simplify and use notes for include path. (tic54x_mlib): Use search_and_open.
Diffstat (limited to 'gas/as.c')
-rw-r--r--gas/as.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gas/as.c b/gas/as.c
index a18438c..593eaec 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1308,6 +1308,8 @@ gas_early_init (int *argcp, char ***argvp)
expandargv (argcp, argvp);
+ init_include_dir ();
+
#ifdef HOST_SPECIAL_INIT
HOST_SPECIAL_INIT (*argcp, *argvp);
#endif