mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
5f85f202a4
4 changed files with 47 additions and 3 deletions
|
|
@ -558,8 +558,14 @@ CHECK_STDCXX = $(call CHECK_SYMBOLS,$(1),GLIBCXX,libstdc++,v[1] > 3 || (v[1] ==
|
|||
CHECK_GLIBC = $(call CHECK_SYMBOLS,$(1),GLIBC,libc,v[1] > 2 || (v[1] == 2 && v[2] > 12))
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
ELF_TEST = elfdump -N .dynamic $(1)
|
||||
else
|
||||
ELF_TEST = $(TOOLCHAIN_PREFIX)readelf -d $(1)
|
||||
endif
|
||||
|
||||
ifeq (,$(filter $(OS_TARGET),WINNT Darwin))
|
||||
CHECK_TEXTREL = @$(TOOLCHAIN_PREFIX)readelf -d $(1) | grep TEXTREL > /dev/null && echo 'TEST-UNEXPECTED-FAIL | check_textrel | We do not want text relocations in libraries and programs' || true
|
||||
CHECK_TEXTREL = @$(ELF_TEST) | grep TEXTREL > /dev/null && echo 'TEST-UNEXPECTED-FAIL | check_textrel | We do not want text relocations in libraries and programs' || true
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
|
||||
|
|
|
|||
|
|
@ -426,6 +426,17 @@ SVGUseElement::LookupHref()
|
|||
nsCOMPtr<nsIURI> targetURI;
|
||||
nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(targetURI), href,
|
||||
GetComposedDoc(), baseURI);
|
||||
|
||||
// Do not allow 'data:' schemes in <use> elements.
|
||||
// See spec update: https://github.com/w3c/svgwg/pull/901
|
||||
if (targetURI) {
|
||||
bool isData;
|
||||
mozilla::Unused << targetURI->SchemeIs("data", &isData);
|
||||
if (isData) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
mSource.Reset(this, targetURI);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,23 @@ def dependentlibs_mingw_objdump(lib):
|
|||
proc.wait()
|
||||
return deps
|
||||
|
||||
def dependentlibs_elfdump(lib):
|
||||
'''Returns the list of dependencies declared in the given ELF .so'''
|
||||
proc = subprocess.Popen(['elfdump', '-N', '.dynamic', lib], stdout = subprocess.PIPE)
|
||||
deps = []
|
||||
for line in proc.stdout:
|
||||
# Each line has the following format:
|
||||
# index TYPE tag value
|
||||
tmp = line
|
||||
if len(tmp) > 3 and 'NEEDED' in tmp:
|
||||
# NEEDED lines look like:
|
||||
# [1] NEEDED 0x0000001 libname
|
||||
match = re.search(r'(lib\w+.so.*)', tmp)
|
||||
if match:
|
||||
deps.append(match.group(1))
|
||||
proc.wait()
|
||||
return deps
|
||||
|
||||
def dependentlibs_readelf(lib):
|
||||
'''Returns the list of dependencies declared in the given ELF .so'''
|
||||
proc = subprocess.Popen([substs.get('TOOLCHAIN_PREFIX', '') + 'readelf', '-d', lib], stdout = subprocess.PIPE)
|
||||
|
|
@ -118,7 +135,10 @@ def dependentlibs(lib, libpaths, func):
|
|||
def gen_list(output, lib):
|
||||
libpaths = [os.path.join(substs['DIST'], 'bin')]
|
||||
binary_type = get_type(lib)
|
||||
if binary_type == ELF:
|
||||
if substs['OS_ARCH'] == 'SunOS':
|
||||
# If we're on SunOS, we're using ELF, but can't rely on readelf.
|
||||
func = dependentlibs_elfdump
|
||||
elif binary_type == ELF:
|
||||
func = dependentlibs_readelf
|
||||
elif binary_type == MACHO:
|
||||
func = dependentlibs_otool
|
||||
|
|
|
|||
|
|
@ -47,6 +47,13 @@ endif
|
|||
|
||||
LOCAL_CHECKS = test "$$($(get_first_and_last) | xargs echo)" != "start_kPStaticModules_NSModule end_kPStaticModules_NSModule" && echo "NSModules are not ordered appropriately" && exit 1 || exit 0
|
||||
|
||||
ifeq (,$(filter-out SunOS Linux,$(OS_ARCH)))
|
||||
ifeq (Linux,$(OS_ARCH))
|
||||
LOCAL_CHECKS += ; test "$$($(TOOLCHAIN_PREFIX)readelf -l $1 | awk '$1 == "LOAD" { t += 1 } END { print t }')" -le 1 && echo "Only one PT_LOAD segment" && exit 1 || exit 0
|
||||
endif
|
||||
|
||||
# It's safer to use elfdump on SunOS, because that's available on all
|
||||
# supported versions of Solaris and illumos.
|
||||
|
||||
ifeq (SunOS,$(OS_ARCH))
|
||||
LOCAL_CHECKS += ; test "elfdump -p $1 | awk '$5 == "PT_LOAD" { t += 1 } END { print t }')" -le 1 && echo "Only one PT_LOAD segment" && exit 1 || exit 0
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue