From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AUS01-ME1-obe.outbound.protection.outlook.com (mail-eopbgr1360113.outbound.protection.outlook.com [40.107.136.113]) by sourceware.org (Postfix) with ESMTPS id 524553857829 for ; Thu, 22 Oct 2020 05:23:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 524553857829 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J4oM7whRLt9Nj1IoSW6SyDWh21QcsTczadWoWdxvAmObSe61AzypM61UrpVM2jA3ZhEodsP4kSomWT88nd38pc95NOkWUE/6QVlcMJhX6RoGmbRK3asmpJIkd+w9CIX4BDC28NZzgU0D2oOcG+KxaY9/dVdofrv9wJaHuolz+nQ11siaEthGW8LnENBKTVfsgnIH1z+8VmKN/RPLjRzHZj4nT4zBZU/iidYtWgiM6y5nm1VW3oxn92saRA+EZBR6dd2GAQvWjyN63FGcYo44OFTLWNOGCw2cestpisBZffkF2E/ftkHq6btoUsYyvHT+gE00Ae9r/F1zUu4kZk9J2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NH9GHcB3CvXglL1aMRkspqm0zIrIRekpKc8XzrOv+tQ=; b=XIBFQ5JQ9WUJ7yS3d5tZiwYBAgzgWjvPs5X8m3HO/CGN84H+8MhEUXxOvshmDr40EABJTX2G/MNQlXsi/slH26hiXg2fJq5In6vaUajq8QBGbSfylU/4QXdg65a4/ZQVrRra4w2DvTxAwgTqIY7MNe8Yvk8VnUURlx2Z08JyP9c9RI5PORcu4iTRG6fd6sXQs1L8bwyb9Vo66y41nXtF2Ivx4vGd5PRTmj30aJeYzqfTvqDxF4+nJFz47BIQ2RAEJLD3jOdTdF4VLYxpWdGrPTa5E2hJoVZUpovjbKfJ+4z8wdBXiJiCuz/zJ6hN55mKjCf8VJMhvLwdarP+fV1l2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=postgrad.otago.ac.nz; dmarc=pass action=none header.from=postgrad.otago.ac.nz; dkim=pass header.d=postgrad.otago.ac.nz; arc=none Received: from SYAPR01MB2639.ausprd01.prod.outlook.com (2603:10c6:1:c::12) by SYCPR01MB5069.ausprd01.prod.outlook.com (2603:10c6:10:4e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Thu, 22 Oct 2020 05:23:39 +0000 Received: from SYAPR01MB2639.ausprd01.prod.outlook.com ([fe80::d1a9:d6d4:e382:4cb8]) by SYAPR01MB2639.ausprd01.prod.outlook.com ([fe80::d1a9:d6d4:e382:4cb8%5]) with mapi id 15.20.3499.019; Thu, 22 Oct 2020 05:23:38 +0000 From: Harley Paterson To: "libc-alpha@sourceware.org" Subject: Dynamic Linker: Exposing static symbols at runtime Thread-Topic: Dynamic Linker: Exposing static symbols at runtime Thread-Index: AQHWqDIDwUMTNY3XiEGUfyDd3XWCRg== Date: Thu, 22 Oct 2020 05:23:38 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [161.65.253.159] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 87540093-a0b7-4693-1f9e-08d8764aa1d4 x-ms-traffictypediagnostic: SYCPR01MB5069: x-microsoft-antispam-prvs: clutterbypassedbytransportruleoverride: true x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T/cE0HPYw6Bfy7FhcEQjvI86Nfzzkoh6JzfsvfY9EsGfUVVTuRt8lhAHllf1Bk1OvykpkOkC423gptXAEVL1uuBMPy1fOFJDMOy6D46Bciq/xLsUXbMckjalFbaiiZYsJYIryyS06X+EpeyTpiMWslmWFSK4f0A08f1zuVbbNNFFgnmyuhYL9xUeZGHOCfnyd0MzM3+Xcht/3VT3ZGThcL+c8IpT8wycgxuSf1Wb18PvoXJVSM4L/zFz918JwIKn2GpM1rrFBct9H2ikCRw35uBljqlX5XsJ4zy4kECxJDMQS7HJJtubsv8/LLbpMg65FvKClUW1v+2XxJL3U7/drg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SYAPR01MB2639.ausprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(39860400002)(346002)(366004)(396003)(83380400001)(5660300002)(9686003)(52536014)(71200400001)(66556008)(64756008)(66476007)(66946007)(66446008)(76116006)(44832011)(55016002)(8936002)(7696005)(478600001)(6506007)(8676002)(6916009)(186003)(786003)(316002)(33656002)(2906002)(19627405001)(86362001)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 8ZAJZqwyZ7HOx28OC7/CUhuFc5omPVBDK1Bu86X8CR1wj/x3OnYurnhwcy7XgGxUL/pay5y8XxzKEIBIwEnH8gp6otczQwOf8DjKfYRR5fAWF1h5dO5HTsqJIh+tGpav9zVomImOCiMAa9AxAu2jl1edNMYxPzh+ZO6CYhGQmT4mBpjZ4uHBQ7x0UJyvfJ4SNbGDK/FtXjaRXjauNb+r5bGMgzO+W7B8i2N3KSpu8hIMlTy4lEuAWXHHZ7krrqNeVTYKacW3jzZwMp89xKATQRH9n7qG0HqqFMfegy1w2IxywdJErz+70ZkCtWPWM09JJD8E11LnMCuSpCuYdFG5jzOFWUC5qUCLHc1Rf9VpYwKQMo0c3WadhK43Xo9g6A33jAl1+DwRsF7ZcEd3CU8pJ+X1w+EHzVizdwk6QY5Aki9s6Koi1XfZvb6AKd+aN3dHq5HmO4W0MXc02tHl82S4TDUgOGd0McRCwbtq0GiU8FJ6SW8dIVYFqB7YT0x9FlXVE88Z+091ajDwB6YSqIT9xkaAZm9thegWxVRDzvz35BLKFcVWFLzSvVOY9LiAVSL/9k44T9BWGuZNp1Ahtdg+/jHUZKeNQFXmqAA47iVhSPft0WHMUH9nqbIV/PrrhIbyuGbkfojJcsyBxPVIm9zY2w== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: postgrad.otago.ac.nz X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SYAPR01MB2639.ausprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87540093-a0b7-4693-1f9e-08d8764aa1d4 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2020 05:23:38.1049 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0225efc5-78fe-4928-b157-9ef24809e9ba X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +Iw3uhgY+FrCR+2ABW1Ujak8vpvyqNU5RKrqCr7fxmJlu8HMiU8kUMotAPIMMGNpg4wotwRjCnQx4s40Voc48qhgsNoP8FwKJCTf2K9faoQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SYCPR01MB5069 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2020 05:23:51 -0000 Hello, I'm doing some research on dynamic software updating recently. I've found i= t would be very helpful to expose static symbols to running program, much l= ike `dlopen`, `dlsym`, and friends expose dynamic symbols to running progra= ms via the `dlfcn.h` header. Is anyone able to provide insight into what work is required to get the `ld= -linux.so` to read the static symbol stable, and expose symbols to processe= s via an API? Would the `glibc` community, additionally, be interested in patch with this= functionality when or if I implemented it? I can't immediately think of an= y use cases except my own, however I'm quite willing to contribute this fun= ctionality back if the community wants it. In my use case, my patching software sits between the loader and the user's= target program. When the user issues a request to patch software, along wi= th a target binary, the patcher attempts find symbols which have changed be= tween the loaded version and the updated verion, loads the new versions int= o memory, and patches up requests - either by writing to the PLT, or insert= ing long jumps into the existing functions. I currently anticipate writing = an ELF parser in my patching software to get symbols in the two binaries, a= lthough there are some compilations such as relations and base addresses wh= ich make me suspect this functionality would be best placed in the dynamic = linker, which is awear of the load-time relocations. I appreciate any insight you can provide, H Paterson.