Skip to content

Commit 4c52d64

Browse files
committed
Merge remote-tracking branch 'upstream/master'
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2 parents 9e70fa0 + c3af54a commit 4c52d64

File tree

223 files changed

+21950
-19947
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

223 files changed

+21950
-19947
lines changed

.drone.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
build:
2-
image: fracting/msys32
2+
image: teaci/msys32
3+
pull: true
34
shell: msys32
45
commands:
56
- export RUNTEST=$$runtest

appveyor.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1+
environment:
2+
DEPLOY_PROVIDER: bintray
3+
BINTRAY_ACCOUNT: alexpux
4+
BINTRAY_REPOSITORY: msys2
5+
PACMAN_REPOSITORY_NAME: ci.msys
6+
BUILD_URL: https://ci.appveyor.com/project/$(APPVEYOR_ACCOUNT_NAME)/$(APPVEYOR_PROJECT_NAME)/build/$(APPVEYOR_BUILD_VERSION)
7+
18
build_script:
29
# TODO: implement update-core --noconfirm and replace the below command line
310
- C:\msys64\usr\bin\pacman --sync --refresh --refresh --needed --noconfirm msys2-runtime msys2-runtime-devel bash pacman pacman-mirrors
411
- C:\msys64\usr\bin\bash --login -c "$(cygpath ${APPVEYOR_BUILD_FOLDER})/ci-build.sh"
12+
13+
artifacts:
14+
- path: artifacts\*
15+
16+
deploy:
17+
- provider: BinTray
18+
username: $(BINTRAY_ACCOUNT)
19+
subject: $(BINTRAY_ACCOUNT)
20+
repo: $(BINTRAY_REPOSITORY)
21+
package: $(PACMAN_REPOSITORY_NAME)
22+
version: latest
23+
publish: true
24+
override: true
25+
api_key:
26+
secure: BINTRAY_TOKEN_ENCRYPTED_BY_APPVEYOR

apr-util/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
pkgname=('apr-util' 'apr-util-devel')
44
pkgver=1.5.4
5-
pkgrel=1
5+
pkgrel=2
66
pkgdesc="The Apache Portable Runtime"
77
arch=('i686' 'x86_64')
88
url="https://apr.apache.org/"

apr/PKGBUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
22

33
pkgname=('apr' 'apr-devel')
4-
pkgver=1.5.1
4+
pkgver=1.5.2
55
pkgrel=1
66
pkgdesc="The Apache Portable Runtime"
77
arch=('i686' 'x86_64')
@@ -17,7 +17,7 @@ source=(https://archive.apache.org/dist/apr/apr-${pkgver}.tar.bz2
1717
'tests-fix_paths.patch'
1818
'tests.patch'
1919
'fix-debian-layout.patch')
20-
sha256sums=('e94abe431d4da48425fcccdb27b469bd0f8151488f82e5630a56f26590e198ac'
20+
sha256sums=('7d03ed29c22a7152be45b8e50431063736df9e1daa1ddf93f6a547ba7a28f67a'
2121
'7b5d67e690860c8a575aa0b42629e6c4122d897199a403d716695774d08c7bb7'
2222
'746861efed2c2e064b6acfef6ab2ee3f343ad411528a48a63dc4a3028a7aa333'
2323
'94657ee8603f12cc4a767f819cc52c4fef6721c98c5c94d9a5e0b8c87cdd5c72'

autoconf/PKGBUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
pkgname=autoconf
55
pkgver=2.69
6-
pkgrel=3
6+
pkgrel=4
77
pkgdesc="A GNU tool for automatically configuring source code"
88
arch=('any')
99
license=('GPL2' 'GPL3' 'custom')
1010
url="https://www.gnu.org/software/autoconf"
1111
groups=('base-devel')
12-
depends=('awk' 'm4' 'diffutils' 'bash')
12+
depends=('awk' 'm4' 'diffutils' 'bash' 'perl')
1313
# for test-suite
1414
makedepends=('gcc-fortran')
1515
install=autoconf.install
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
2+
index 8d98fec..8f76b4d 100644
3+
--- a/bfd/cofflink.c
4+
+++ b/bfd/cofflink.c
5+
@@ -426,7 +426,7 @@ coff_link_add_symbols (bfd *abfd,
6+
if (((*sym_hash)->symbol_class == C_NULL
7+
&& (*sym_hash)->type == T_NULL)
8+
|| sym.n_scnum != 0
9+
- || (sym.n_value != 0
10+
+ || ((sym.n_value != 0 || IS_WEAK_EXTERNAL(abfd, sym))
11+
&& (*sym_hash)->root.type != bfd_link_hash_defined
12+
&& (*sym_hash)->root.type != bfd_link_hash_defweak))
13+
{
14+
@@ -2890,6 +2890,37 @@ _bfd_coff_reloc_link_order (bfd *output_bfd,
15+
return TRUE;
16+
}
17+
18+
+/* See _Microsoft Portable Executable and Common Object File Format
19+
+ Specification_, section 5.5.3. Note that weak symbols without aux records
20+
+ are a GNU extension.
21+
+
22+
+ FIXME: All weak externals are treated as having characteristic
23+
+ IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY (1). These behave as per SVR4 ABI: A
24+
+ library member will resolve a weak external only if a normal external causes
25+
+ the library member to be linked. See also linker.c:
26+
+ generic_link_check_archive_element. */
27+
+
28+
+static void _bfd_coff_relocate_weak_externals(struct coff_link_hash_entry *h,
29+
+ bfd_vma *val, asection **sec)
30+
+{
31+
+ long aux_index = h->aux->x_sym.x_tagndx.l;
32+
+ struct coff_tdata *cdata = h->auxbfd->tdata.coff_obj_data;
33+
+ struct coff_link_hash_entry *h2 = cdata->sym_hashes[aux_index];
34+
+
35+
+ if (!h2 || h2->root.type == bfd_link_hash_undefined)
36+
+ {
37+
+ *sec = bfd_abs_section_ptr;
38+
+ *val = 0;
39+
+ }
40+
+ else
41+
+ {
42+
+ *sec = h2->root.u.def.section;
43+
+ *val = h2->root.u.def.value + (*sec)->output_section->vma +
44+
+ (*sec)->output_offset;
45+
+ }
46+
+}
47+
+
48+
+
49+
/* A basic reloc handling routine which may be used by processors with
50+
simple relocs. */
51+
52+
@@ -2999,38 +3030,14 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
53+
else if (h->root.type == bfd_link_hash_undefweak)
54+
{
55+
if (h->symbol_class == C_NT_WEAK && h->numaux == 1)
56+
- {
57+
- /* See _Microsoft Portable Executable and Common Object
58+
- File Format Specification_, section 5.5.3.
59+
- Note that weak symbols without aux records are a GNU
60+
- extension.
61+
- FIXME: All weak externals are treated as having
62+
- characteristic IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY (1).
63+
- These behave as per SVR4 ABI: A library member
64+
- will resolve a weak external only if a normal
65+
- external causes the library member to be linked.
66+
- See also linker.c: generic_link_check_archive_element. */
67+
- struct coff_link_hash_entry *h2 =
68+
- h->auxbfd->tdata.coff_obj_data->sym_hashes[
69+
- h->aux->x_sym.x_tagndx.l];
70+
-
71+
- if (!h2 || h2->root.type == bfd_link_hash_undefined)
72+
- {
73+
- sec = bfd_abs_section_ptr;
74+
- val = 0;
75+
- }
76+
- else
77+
- {
78+
- sec = h2->root.u.def.section;
79+
- val = h2->root.u.def.value
80+
- + sec->output_section->vma + sec->output_offset;
81+
- }
82+
- }
83+
+ _bfd_coff_relocate_weak_externals(h, &val, &sec);
84+
else
85+
/* This is a GNU extension. */
86+
val = 0;
87+
}
88+
-
89+
+ else if (h->root.type == bfd_link_hash_undefined &&
90+
+ h->symbol_class == C_NT_WEAK && h->numaux == 1)
91+
+ _bfd_coff_relocate_weak_externals(h, &val, &sec);
92+
else if (! bfd_link_relocatable (info))
93+
{
94+
if (! ((*info->callbacks->undefined_symbol)
95+
--
96+
2.1.0
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
2+
index 8f76b4d..f9b591a 100644
3+
--- a/bfd/cofflink.c
4+
+++ b/bfd/cofflink.c
5+
@@ -1944,7 +1944,8 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
6+
if ((*indexp < 0
7+
|| (bfd_size_type) *indexp < syment_base)
8+
&& (*sym_hash == NULL
9+
- || (*sym_hash)->auxbfd != input_bfd))
10+
+ || (*sym_hash)->auxbfd != input_bfd)
11+
+ && isymp->n_sclass != C_NT_WEAK)
12+
esym += add * isymesz;
13+
else
14+
{
15+
@@ -2014,8 +2015,15 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
16+
auxp->x_file.x_n.x_offset = STRING_SIZE_SIZE + indx;
17+
}
18+
}
19+
- else if ((isymp->n_sclass != C_STAT || isymp->n_type != T_NULL)
20+
- && isymp->n_sclass != C_NT_WEAK)
21+
+ else if (isymp->n_sclass == C_NT_WEAK)
22+
+ {
23+
+ long *tagndx = &auxp->x_sym.x_tagndx.l;
24+
+
25+
+ if (bfd_link_relocatable (flaginfo->info) &&
26+
+ flaginfo->sym_indices[*tagndx] > 0)
27+
+ *tagndx = flaginfo->sym_indices[*tagndx];
28+
+ }
29+
+ else if (isymp->n_sclass != C_STAT || isymp->n_type != T_NULL)
30+
{
31+
unsigned long indx;
32+
33+
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
34+
index c0a3f1f..ac2310c 100644
35+
--- a/gas/config/obj-coff.c
36+
+++ b/gas/config/obj-coff.c
37+
@@ -1277,6 +1277,7 @@ coff_frob_symbol (symbolS *symp, int *punt)
38+
symbol_get_value_expression (weakp));
39+
symbol_set_frag (symp, symbol_get_frag (weakp));
40+
S_SET_SEGMENT (symp, S_GET_SEGMENT (weakp));
41+
+ S_SET_DATA_TYPE (symp, S_GET_DATA_TYPE (weakp));
42+
}
43+
else
44+
{
45+
--
46+
2.1.0
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
2+
index 2499885..fc61dee 100644
3+
--- a/bfd/coffcode.h
4+
+++ b/bfd/coffcode.h
5+
@@ -4202,6 +4202,7 @@ coff_write_object_contents (bfd * abfd)
6+
{
7+
int firstundef;
8+
9+
+ coff_nt_weak_to_local(abfd);
10+
if (!coff_renumber_symbols (abfd, &firstundef))
11+
return FALSE;
12+
coff_mangle_symbols (abfd);
13+
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
14+
index 9257f73..dd05823 100644
15+
--- a/bfd/coffgen.c
16+
+++ b/bfd/coffgen.c
17+
@@ -788,6 +788,49 @@ coff_renumber_symbols (bfd *bfd_ptr, int *first_undef)
18+
return TRUE;
19+
}
20+
21+
+/* Transform weak externals to local symbols if requested (e.g. objcopy). */
22+
+void coff_nt_weak_to_local(bfd *abfd)
23+
+{
24+
+ unsigned int symbol_count = bfd_get_symcount (abfd);
25+
+ asymbol **symbol_ptr_ptr = abfd->outsymbols;
26+
+ unsigned int symbol_index;
27+
+
28+
+ for (symbol_index = 0; symbol_index < symbol_count; symbol_index++)
29+
+ {
30+
+ asymbol *symbol = symbol_ptr_ptr[symbol_index];
31+
+ coff_symbol_type *coff_symbol_ptr;
32+
+ combined_entry_type *native;
33+
+ struct internal_syment *sym;
34+
+
35+
+ coff_symbol_ptr = coff_symbol_from (symbol);
36+
+ if (!coff_symbol_ptr)
37+
+ continue;
38+
+
39+
+ native = coff_symbol_ptr->native;
40+
+ if (!native)
41+
+ continue;
42+
+
43+
+ sym = &native->u.syment;
44+
+
45+
+ if ((symbol->flags & BSF_LOCAL) && sym->n_sclass == C_NT_WEAK
46+
+ && sym->n_numaux == 1) {
47+
+ union internal_auxent *aux = &native[1].u.auxent;
48+
+ struct internal_syment *wsym = &aux->x_sym.x_tagndx.p->u.syment;
49+
+
50+
+ if (!wsym) {
51+
+ symbol->flags &= BSF_LOCAL;
52+
+ continue;
53+
+ }
54+
+
55+
+ symbol->flags &= ~BSF_WEAK;
56+
+ symbol->value = wsym->n_value;
57+
+ symbol->section = coff_section_from_bfd_index (abfd, wsym->n_scnum);
58+
+ symbol->section->output_section = symbol->section;
59+
+ sym->n_numaux = 0;
60+
+ }
61+
+ }
62+
+}
63+
+
64+
/* Run thorough the symbol table again, and fix it so that all
65+
pointers to entries are changed to the entries' index in the output
66+
symbol table. */
67+
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
68+
index 124e603..3ccf4d6 100644
69+
--- a/bfd/libcoff.h
70+
+++ b/bfd/libcoff.h
71+
@@ -309,6 +309,8 @@ extern long coff_canonicalize_symtab
72+
(bfd *, asymbol **);
73+
extern int coff_count_linenumbers
74+
(bfd *);
75+
+extern void coff_nt_weak_to_local
76+
+ (bfd *);
77+
extern bfd_boolean coff_renumber_symbols
78+
(bfd *, int *);
79+
extern void coff_mangle_symbols
80+
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
81+
index 2cd55fd..94b7702 100644
82+
--- a/binutils/objcopy.c
83+
+++ b/binutils/objcopy.c
84+
@@ -1372,7 +1372,10 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
85+
sym->flags |= BSF_WEAK;
86+
}
87+
88+
- if (!undefined
89+
+ /* We want to check even undefined weak symbols in the case of PE,
90+
+ * since weak externals are classified as undefined. */
91+
+ if ((!undefined || (bfd_get_flavour (abfd) == bfd_target_coff_flavour &&
92+
+ CONST_STRNEQ ((abfd)->xvec->name, "pe")))
93+
&& (flags & (BSF_GLOBAL | BSF_WEAK))
94+
&& (is_specified_symbol (name, localize_specific_htab)
95+
|| (htab_elements (keepglobal_specific_htab) != 0
96+
--
97+
2.1.0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
2+
index 2499885..fc61dee 100644
3+
--- a/bfd/cofflink.c
4+
+++ b/bfd/cofflink.c
5+
@@ -2977,6 +2977,12 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
6+
else
7+
{
8+
sec = sections[symndx];
9+
+
10+
+ /* PR 19623: Relocations against symbols in
11+
+ the absolute sections should ignored. */
12+
+ if (bfd_is_abs_section (sec))
13+
+ continue;
14+
+
15+
val = (sec->output_section->vma
16+
+ sec->output_offset
17+
+ sym->n_value);
18+
--
19+
2.1.0

binutils/0005-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch renamed to binutils/0050-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch

File renamed without changes.

0 commit comments

Comments
 (0)