Commit graph

21 commits

Author SHA1 Message Date
Elliott Hughes
68b3833262 Update linker/NOTICE.
Someone's been skipping repo's preupload hooks...

Test: treehugger
Change-Id: Id5e473c883bde47da17baa7576bc0e9c045403e8
2024-02-09 09:27:33 -08:00
Elliott Hughes
838dbacbfd linker: add LD_SHOW_AUXV support.
Yes, `od -t d8 /proc/self/auxv` is clever:
```
$ adb shell od -t d8 /proc/self/auxv
0000000                      33            488593047552
0000020                      51                    4720
0000040                      16                 1155071
0000060                       6                    4096
0000100                      17                     100
0000120                       3            375971917888
0000140                       4                      56
0000160                       5                      12
0000200                       7            488593051648
0000220                       8                       0
0000240                       9            375972184064
0000260                      11                       0
0000300                      12                       0
0000320                      13                       0
0000340                      14                       0
0000360                      23                       0
0000400                      25            549220780840
0000420                      26                       0
0000440                      31            549220786153
0000460                      15            549220780856
0000500                       0                       0
0000520
$
```
But this is a lot easier to read:
```
$ adb shell LD_SHOW_AUXV=1 date
AT_SYSINFO_EHDR      0x7065010000
AT_MINSIGSTKSZ       4720
AT_HWCAP             0b100011001111111111111
AT_PAGESZ            4096
AT_CLKTCK            100
AT_PHDR              0x5c79d60040
AT_PHENT             56
AT_PHNUM             12
AT_BASE              0x7065011000
AT_FLAGS             0
AT_ENTRY             0x5c79da1000
AT_UID               0
AT_EUID              0
AT_GID               0
AT_EGID              0
AT_SECURE            0
AT_RANDOM            0x7ff814eb98
AT_HWCAP2            0
AT_EXECFN            "/system/bin/date"
AT_PLATFORM          "aarch64"
Tue Aug 22 20:43:22 GMT 2023
```

Test: adb shell LD_SHOW_AUXV=1 date
Change-Id: I51c4e8cbb799eb1dc360c9417cc6f82bebdcda73
2023-08-22 14:25:01 -07:00
Elliott Hughes
3e4f603c7f riscv64: build the linker.
The only meaningful change from alibaba's version is jr instead of jalr.

Also fix the comment that's in all the begin.S files while we're here.

Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
Signed-off-by: Xia Lifang <lifang_xia@linux.alibaba.com>
Signed-off-by: Chen Guoyin <chenguoyin.cgy@linux.alibaba.com>
Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
Signed-off-by: Lu Xufan <luxufan@iscas.ac.cn>
Test: ran mksh
Change-Id: I2645c78bd700b8a55bde363600d7f8b87de641a1
2022-10-22 03:57:11 +00:00
Collin Fijalkovich
47d27aa79c Bionic: Mark PMD aligned text segments huge page eligible
To take advantage of file-backed huge pages for the text segments of key
shared libraries (go/android-hugepages), the dynamic linker must load
candidate ELF files at an appropriately aligned address and mark
executable segments with MADV_HUGEPAGE.

This patches uses segments' p_align values to determine when a file is
PMD aligned (2MB alignment), and performs load operations accordingly.

Bug: 158135888
Test: Verified PMD aligned libraries are backed with huge pages on
supporting kernel versions.

Change-Id: Ia2367fd5652f663d50103e18f7695c59dc31c7b9
2021-05-06 13:15:11 -07:00
Elliott Hughes
aa8db1b9d1 Fix/update notices.
Auto-generate NOTICE files for all the directories, and for each one
individually rather than mixing libc and libm together.

Test: N/A
Change-Id: I7e251194a8805c4ca78fcc5675c3321bcd5abf0a
2021-02-16 15:06:50 -08:00
Elliott Hughes
fa8774462f Make the linker NOTICE file match the linker source.
Test: eyeball
Change-Id: I3e10bd813eff5cc05fc9c4f50a75777b82df9a5c
2019-12-20 12:29:39 -08:00
Elliott Hughes
584bc626b6 Move libdl and linker to static NOTICE files.
The libstdc++ directory has no copyright headers, so it was a no-op
anyway.

The interesting part will be switching libc and libm over to genrules...

Test: N/A
Change-Id: Iec92562af40c451fdcb4a7468984878ec5dba2ce
2019-04-19 14:18:07 -07:00
Dan Albert
c30862fdbc One NOTICE file to rule them all.
Generate a single NOTICE file rather than one per library. All the
headers come from libc these days anyway.

Test: tools/update_notice.sh
Bug: None
Change-Id: I127da185fdabc2815042e19aea74c507ec108f46
2016-10-20 11:48:55 -07:00
Elliott Hughes
77a3e28e2e Update NOTICE files.
Change-Id: I591dc91b54804aebc05ba6f9974ef9add660ecfe
2016-08-08 12:39:56 -07:00
Elliott Hughes
882b8afedc Regenerate NOTICE files.
Also clean up some near-miss copyright headers in libm, and remove
some cruft in <grp.h>/<pwd.h> that the script can't automatically
ignore since we stripped all the tabs in those files.

Change-Id: I10796c54dda1ceba87822ae0de26b5d71b54972b
2016-05-16 17:46:00 -07:00
Elliott Hughes
44ead71726 Regenerate NOTICE files.
Change-Id: Ia5c340220bb75e4e3166cc483ea77d19cfb08a71
2015-08-28 20:23:52 -07:00
Elliott Hughes
f58ac87182 Update NOTICE files (the second time today).
Change-Id: Ifb031d29ee697ee0682bd651e0081493e8016e67
2015-05-12 10:44:37 -07:00
Elliott Hughes
7e54c762fc Update NOTICE files.
(cherry-pick of f0bd92db8966b04062fda0986dacf80891e1a378.)
Change-Id: I4e170118abf452dd87ffe79d343ba1e2b53955de
2015-05-12 10:33:20 -07:00
Elliott Hughes
3758a244cf Fix a couple of bugs in generate-NOTICE and regenerate the NOTICE files.
Change-Id: Id6fcb74292e661504d0758bfce24abdc18cb8d32
2014-07-22 21:29:00 -07:00
Elliott Hughes
1558138315 Regenerate the bionic NOTICE files.
Also fix a few formatting issues in copyright headers that were confusing
the script (though obviously it would be better if the script were smarter).

Change-Id: I7f561bef4f84fdcbd84f375ee226bd65db0e507b
2014-07-07 15:42:06 -07:00
Elliott Hughes
54a7494f17 Regenerate the NOTICE files.
Also standardize the orthography in a few places to reduce near-duplicates
in the NOTICE files.

Change-Id: I347c75e817be61ec1b9c5b4b96226feedc8d09ab
2014-01-07 13:46:11 -08:00
Elliott Hughes
32dbc03c73 Regenerate all NOTICE files with the latest version of the script.
This sorts every entry, so we should have more stability and fewer
merge conflicts in future.

Change-Id: Ifc5347dc53352da22c82d41ca59b483966fcfc6b
2012-08-15 15:43:13 -07:00
Elliott Hughes
387d4b7de9 Auto-generate a complete NOTICE file.
Remove the hand-collated ones, and switch to a script that pulls the
copyright headers out of every file and collects the unique ones.

Change-Id: Ied3b98b3f56241df97166c410ff81de4e0157c9d
2012-08-09 16:05:31 -07:00
The Android Open Source Project
1dc9e472e1 auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
The Android Open Source Project
1767f908af auto import from //depot/cupcake/@135843 2009-03-03 18:28:13 -08:00
The Android Open Source Project
a27d2baa0c Initial Contribution 2008-10-21 07:00:00 -07:00